From 850f4238303b20bb48934acf38e2c294f5efe7e8 Mon Sep 17 00:00:00 2001 From: shijian <2954700422@qq.com> Date: Sat, 30 Sep 2023 05:06:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 26 ++++++++++++++------------ layout/default/codemirror.css | 7 +------ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/game/game.js b/game/game.js index 7c46ef9b5..3f6c171e0 100644 --- a/game/game.js +++ b/game/game.js @@ -5,19 +5,19 @@ localStorage.setItem('gplv3_noname_alerted',true); } else{ - var ua=navigator.userAgent.toLowerCase(); - var ios=ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1||ua.indexOf('macintosh')!=-1; + const ua=navigator.userAgent.toLowerCase(); + const ios=ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1||ua.indexOf('macintosh')!=-1; //electron if(typeof window.process=='object'&&typeof window.require=='function'){ - var versions=window.process.versions; - var electronVersion=parseFloat(versions.electron); - var remote; + const versions=window.process.versions; + const electronVersion=parseFloat(versions.electron); + let remote; if(electronVersion>=14){ remote=require('@electron/remote'); }else{ remote=require('electron').remote; } - var thisWindow=remote.getCurrentWindow(); + const thisWindow=remote.getCurrentWindow(); thisWindow.destroy(); window.process.exit(); } @@ -7560,12 +7560,12 @@ else if(type== 'string') { className+='text'; } - else if(['object','number'].includes(type)){ - className+='namespace'; - } else if(type== 'boolean') { className+='variable'; } + else{ + className+='namespace'; + } }else{ if(javascriptKeywords.includes(text)||javascriptKeywords.includes(text)){ className+='keyword'; @@ -7578,12 +7578,14 @@ else if(type=='string'){ className+='text'; } - else if((type=='object'&&text!='window')||type=='number'){ - className+='namespace'; - } else if(text=='window'||type=='boolean'){ className+='variable'; } + else{ + className+='namespace'; + } + }else{ + className+='namespace'; } } icon.className=className; diff --git a/layout/default/codemirror.css b/layout/default/codemirror.css index c9a9446a0..56f755f16 100644 --- a/layout/default/codemirror.css +++ b/layout/default/codemirror.css @@ -468,14 +468,9 @@ div.cm-s-mdn-like span.CodeMirror-matchingbracket { outline:1px solid grey; colo display: block; } -@media (max-width: 1000px) { - .CodeMirror-hints::-webkit-scrollbar { - width: 25px; - } -} - .CodeMirror-hints::-webkit-scrollbar-thumb { background-color: rgb(218, 215, 215); + border-radius: 5px; height: 50px; }