编辑器样式优化
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);
|
localStorage.setItem('gplv3_noname_alerted',true);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var ua=navigator.userAgent.toLowerCase();
|
const ua=navigator.userAgent.toLowerCase();
|
||||||
var ios=ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1||ua.indexOf('macintosh')!=-1;
|
const ios=ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1||ua.indexOf('macintosh')!=-1;
|
||||||
//electron
|
//electron
|
||||||
if(typeof window.process=='object'&&typeof window.require=='function'){
|
if(typeof window.process=='object'&&typeof window.require=='function'){
|
||||||
var versions=window.process.versions;
|
const versions=window.process.versions;
|
||||||
var electronVersion=parseFloat(versions.electron);
|
const electronVersion=parseFloat(versions.electron);
|
||||||
var remote;
|
let remote;
|
||||||
if(electronVersion>=14){
|
if(electronVersion>=14){
|
||||||
remote=require('@electron/remote');
|
remote=require('@electron/remote');
|
||||||
}else{
|
}else{
|
||||||
remote=require('electron').remote;
|
remote=require('electron').remote;
|
||||||
}
|
}
|
||||||
var thisWindow=remote.getCurrentWindow();
|
const thisWindow=remote.getCurrentWindow();
|
||||||
thisWindow.destroy();
|
thisWindow.destroy();
|
||||||
window.process.exit();
|
window.process.exit();
|
||||||
}
|
}
|
||||||
|
@ -7560,12 +7560,12 @@
|
||||||
else if(type== 'string') {
|
else if(type== 'string') {
|
||||||
className+='text';
|
className+='text';
|
||||||
}
|
}
|
||||||
else if(['object','number'].includes(type)){
|
|
||||||
className+='namespace';
|
|
||||||
}
|
|
||||||
else if(type== 'boolean') {
|
else if(type== 'boolean') {
|
||||||
className+='variable';
|
className+='variable';
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
className+='namespace';
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if(javascriptKeywords.includes(text)||javascriptKeywords.includes(text)){
|
if(javascriptKeywords.includes(text)||javascriptKeywords.includes(text)){
|
||||||
className+='keyword';
|
className+='keyword';
|
||||||
|
@ -7578,12 +7578,14 @@
|
||||||
else if(type=='string'){
|
else if(type=='string'){
|
||||||
className+='text';
|
className+='text';
|
||||||
}
|
}
|
||||||
else if((type=='object'&&text!='window')||type=='number'){
|
|
||||||
className+='namespace';
|
|
||||||
}
|
|
||||||
else if(text=='window'||type=='boolean'){
|
else if(text=='window'||type=='boolean'){
|
||||||
className+='variable';
|
className+='variable';
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
className+='namespace';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
className+='namespace';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon.className=className;
|
icon.className=className;
|
||||||
|
|
|
@ -468,14 +468,9 @@ div.cm-s-mdn-like span.CodeMirror-matchingbracket { outline:1px solid grey; colo
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1000px) {
|
|
||||||
.CodeMirror-hints::-webkit-scrollbar {
|
|
||||||
width: 25px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-hints::-webkit-scrollbar-thumb {
|
.CodeMirror-hints::-webkit-scrollbar-thumb {
|
||||||
background-color: rgb(218, 215, 215);
|
background-color: rgb(218, 215, 215);
|
||||||
|
border-radius: 5px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue