1function updateURLParameter(url, param, paramVal) { 2 var TheAnchor = null 3 var newAdditionalURL = '' 4 var tempArray = url.split('?') 5 var baseURL = tempArray[0] 6 var additionalURL = tempArray[1] 7 var temp = '' 8 9 if (additionalURL) { 10 var tmpAnchor = additionalURL.split('#') 11 var TheParams = tmpAnchor[0] 12 var TheAnchor = tmpAnchor[1] 13 if (TheAnchor) { 14 additionalURL = TheParams 15 } 16 tempArray = additionalURL.split('&') 17 18 for (var i = 0; i < tempArray.length; i++) { 19 if (tempArray[i].split('=')[0] != param) { 20 newAdditionalURL += temp + tempArray[i] 21 temp = '&' 22 } 23 } 24 } else { 25 var tmpAnchor = baseURL.split('#') 26 var TheParams = tmpAnchor[0] 27 var TheAnchor = tmpAnchor[1] 28 if (TheParams) { 29 baseURL = TheParams 30 } 31 } 32 if (TheAnchor) { 33 paramVal += '#' + TheAnchor 34 } 35 var rows_txt = temp + '' + param + '=' + paramVal 36 return baseURL + '?' + newAdditionalURL + rows_txt 37} 38 39function toggleLightDarkTheme(theme) { 40 var href = window.location.href 41 if (theme === 'default') { 42 theme = 'dark' 43 } else { 44 theme = 'default' 45 } 46 47 href = updateURLParameter(href, 'theme', theme) 48 window.location.href = href 49} 50 51function changeLocation(href) { 52 var href_old = window.location.href 53 var url_old = new URL(href_old) 54 var theme = url_old.searchParams.get('theme', '') 55 if (theme) { 56 href = updateURLParameter(href, 'theme', theme) 57 } 58 window.location.href = href 59} 60 61function isFullScreen() { 62 return ( 63 document.fullscreenElement || 64 document.webkitFullscreenElement || 65 document.mozFullScreenElement || 66 document.msFullscreenElement 67 ) 68} 69 70function exitFullScreen() { 71 if (document.exitFullscreen) { 72 document.exitFullscreen() 73 } else if (document.mozCancelFullScreen) { 74 document.mozCancelFullScreen() 75 } else if (document.webkitExitFullscreen) { 76 document.webkitExitFullscreen() 77 } else if (document.msExitFullscreen) { 78 document.msExitFullscreen() 79 } 80} 81 82function requestFullScreen(element) { 83 if (element.requestFullscreen) { 84 element.requestFullscreen() 85 } else if (element.mozRequestFullScreen) { 86 element.mozRequestFullScreen() 87 } else if (element.webkitRequestFullscreen) { 88 element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) 89 } else if (element.msRequestFullscreen) { 90 element.msRequestFullscreen() 91 } 92} 93 94function toggleFullScreen(caller) { 95 if (isFullScreen()) { 96 exitFullScreen() 97 } else { 98 requestFullScreen(caller.parentElement) 99 } 100} 101 102function addFullScreenToggle() { 103 const elements = document.getElementsByClassName('fullscreen-button') 104 for (let element of elements) { 105 element.setAttribute('onclick', 'toggleFullScreen(this)') 106 } 107} 108document.addEventListener('fullscreenchange', function (e) { 109 const button = e.target.getElementsByClassName('fullscreen-button')[0] 110 if (isFullScreen()) { 111 button.innerHTML = 112 '<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 18 18"><path d="M3 12.5h2.5V15H7v-4H3v1.5zm2.5-7H3V7h4V3H5.5v2.5zM11 15h1.5v-2.5H15V11h-4v4zm1.5-9.5V3H11v4h4V5.5h-2.5z"/></svg>' 113 } else { 114 button.innerHTML = 115 '<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 18 18"><path d="M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z"/></svg>' 116 } 117})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.