diff --git a/docs/resources/js/activate_tab.js b/docs/resources/js/activate_tab.js index 8d2303b53..c7e5ff057 100644 --- a/docs/resources/js/activate_tab.js +++ b/docs/resources/js/activate_tab.js @@ -1,16 +1,12 @@ // Based on https://stackoverflow.com/a/38241481/724176 function getOS() { const userAgent = window.navigator.userAgent, - platform = - window.navigator?.userAgentData?.platform || window.navigator.platform, + platform = window.navigator?.userAgentData?.platform || window.navigator.platform, macosPlatforms = ["macOS", "Macintosh", "MacIntel", "MacPPC", "Mac68K"], - windowsPlatforms = ["Win32", "Win64", "Windows", "WinCE"], - iosPlatforms = ["iPhone", "iPad", "iPod"]; + windowsPlatforms = ["Win32", "Win64", "Windows", "WinCE"]; if (macosPlatforms.includes(platform)) { return "macOS"; - } else if (iosPlatforms.includes(platform)) { - return "iOS"; } else if (windowsPlatforms.includes(platform)) { return "Windows"; } else if (/Android/.test(userAgent)) { @@ -18,8 +14,6 @@ function getOS() { } else if (/Linux/.test(platform)) { return "Linux"; } - - return "unknown"; } function activateTab(tabName) { @@ -28,7 +22,7 @@ function activateTab(tabName) { labels.forEach((label) => { if (label.textContent == tabName) { - // Find the associated input element using the 'for' attribute + // Find the associated input element using the "for" attribute const tabInputId = label.getAttribute("for"); const tabInput = document.getElementById(tabInputId);