1window.windowResize = function () { 2 let html = document.getElementsByTagName('html')[0] 3 let width = window.innerWidth < 980 ? window.innerWidth : 1200 4 /* 640 100 320 50 */ 5 let fontSize = (width / 750) * 100 6 if (window.innerWidth > 980) { 7 html.style.fontSize = 14 + 'px' 8 } else { 9 html.style.fontSize = fontSize + 'px' 10 } 11 12 window.onresize = function () { 13 let html = document.getElementsByTagName('html')[0] 14 let width = window.innerWidth < 980 ? window.innerWidth : 980 15 /* 640 100 320 50 */ 16 let fontSize = (width / 750) * 100 17 if (window.innerWidth > 980) { 18 html.style.fontSize = 14 + 'px' 19 } else { 20 html.style.fontSize = fontSize + 'px' 21 } 22 } 23} 24windowResize() 25 26/** 27 * localStorage ç¼å GA åæ° 28 */ 29function saveGAParams() { 30 function getQueryString(name) { 31 let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i') 32 const search = decodeURIComponent(window.location.search.substr(1)) 33 const r = search.match(reg) 34 if (r != null) return unescape(r[2]) 35 return null 36 } 37 38 const queryKeys = [ 39 'utm_source', 40 'utm_term', 41 'gclid', 42 'wbraid', 43 'gbraid', 44 'campaignid', 45 'adgroupid', 46 'feeditemid', 47 'targetid', 48 'device', 49 'creative', 50 'keyword', 51 'channel', 52 'country', 53 ] 54 55 for (let i in queryKeys) { 56 var key = queryKeys[i] 57 if (getQueryString(key)) { 58 localStorage.setItem(key, getQueryString(key)) 59 } 60 } 61} 62 63saveGAParams()
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.