You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use JS to display appropriate shortcut based on browser.
// Set Bookmark Buttontry{varosName="Unknown";if(window.navigator.userAgent.indexOf("Windows NT 10.0")!=-1)osName="Windows";if(window.navigator.userAgent.indexOf("Mac")!=-1)osName="MacOS";if(window.navigator.userAgent.indexOf("Linux")!=-1)osName="Linux";varmacosSpans=document.querySelectorAll('.macos');varwindowsSpans=document.querySelectorAll('.window');vardefaultSpans=document.querySelectorAll('.default');if(osName==='MacOS'){macosSpans.forEach(span=>{span.classList.remove('hidden');span.classList.add('inline');});}elseif(osName==='Windows'){windowsSpans.forEach(span=>{span.classList.remove('hidden');span.classList.add('inline');});}else{defaultSpans.forEach(span=>{span.classList.remove('hidden');span.classList.add('inline');});}}catch(error){console.error('An error occurred:',error);try{vardefaultSpans=document.querySelectorAll('.default');if(defaultSpans){defaultSpans.forEach(span=>{span.classList.remove('hidden');span.classList.add('inline');});}}catch(error){console.error('An error occurred:',error);}}
The text was updated successfully, but these errors were encountered:
Find a unique way to ask people to bookmark the site.
CTRL+D: Windows + Linux
CMD+D: MacOS
Star Icon: All other devices
Example Code using Tailwind and DaisyUI
Use JS to display appropriate shortcut based on browser.
The text was updated successfully, but these errors were encountered: