let home = this.getRequestParam('home') if(home==null){ localStorage.removeItem('home'); let style = document.createElement('style'); console.log("lang="+LANG_CODE); if( LANG_CODE == 'sc' ){ style.textContent = "body{font-family: 'PingFang SC','Lucida Grande','Hiragino Kaku Gothic ProN','SimSun',Meiryo,sans-serif;}"; } else if( LANG_CODE == 'tc' ){ style.textContent = "body{font-family: 'PingFang TC','Lucida Grande','Hiragino Kaku Gothic ProN','Microsoft JhengHei',Meiryo,sans-serif;}"; } document.getElementsByTagName('head')[0].appendChild(style); } else{ localStorage.setItem('home',1); } window.onload = () => { let btns = document.getElementsByClassName('btn-link'); for( let i=0; i { btns[i].style.cssText = 'background-color: #FFCC00E5;'; } btns[i].onblur = () => { btns[i].style.cssText = 'background-color: #2878CC7F;'; } btns[i].onmouseover = () => { btns[i].focus(); } } } function getRequestParam(name) { const url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&"); let regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, " ")); }