编辑器样式优化
This commit is contained in:
parent
8642efc40b
commit
850f423830
26
game/game.js
26
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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue