diff --git a/game/background.js b/game/background.js deleted file mode 100755 index bf6be75be..000000000 --- a/game/background.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; -(function(){ - var temp; - try{ - temp=JSON.parse(localStorage.getItem('noname_0.9_config')); - if(!temp){ - throw('err'); - } - } - catch(err){ - return; - } - var bg=document.querySelector('.background'); - if(bg){ - bg.style.backgroundSize="cover"; - } - if(temp.image_background&&temp.image_background!='default'&&temp.image_background!='custom'){ - bg.setBackgroundImage('image/background/'+temp.image_background+'.jpg'); - - switch (temp.image_background_filter){ - case 'blur': - bg.style.filter='blur(8px)'; - bg.style.webkitFilter='blur(8px)'; - bg.style.transform='scale(1.05)'; - break; - case 'gray': - bg.style.filter='grayscale(1)'; - bg.style.webkitFilter='grayscale(1)'; - break; - case 'sepia': - bg.style.filter='sepia(0.5)'; - bg.style.webkitFilter='sepia(0.5)'; - break; - case 'invert': - bg.style.filter='invert(1)'; - bg.style.webkitFilter='invert(1)'; - break; - case 'saturate': - bg.style.filter='saturate(5)'; - bg.style.webkitFilter='saturate(5)'; - break; - case 'contrast': - bg.style.filter='contrast(1.4)'; - bg.style.webkitFilter='contrast(1.4)'; - break; - case 'hue': - bg.style.filter='hue-rotate(180deg)'; - bg.style.webkitFilter='hue-rotate(180deg)'; - break; - case 'brightness': - bg.style.filter='brightness(5)'; - bg.style.webkitFilter='brightness(5)'; - break; - default: - bg.style.webkitFilter=''; - } - } - window.resetGameTimeout=setTimeout(function(){ - if(window.inSplash) return; - if(window.resetExtension){ - if(confirm('游戏似乎未正常载入,是否禁用扩展并重新打开?')){ - window.resetExtension(); - window.location.reload(); - } - } - else{ - if(confirm('游戏似乎未正常载入,是否重置游戏?')){ - localStorage.clear(); - if(indexedDB) indexedDB.deleteDatabase('noname_0.9_data'); - window.location.reload(); - } - } - },5000); - var scripts=document.head.querySelectorAll('script'); - for(var i=0;i -
- diff --git a/layout/default/layout.css b/layout/default/layout.css index 865f5965d..2b31918fa 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -5,6 +5,7 @@ html{width: 100%;height: 100%;font-size: 16px;cursor: default;overflow: hidden; -webkit-user-select:none; -webkit-font-smoothing: subpixel-antialiased; -webkit-tap-highlight-color:rgba(0,0,0,0); + background-color: rgb(60,60,60); } body{ width: 100%;height: 100%;padding: 0; margin: 0; diff --git a/mode/boss.js b/mode/boss.js index 220ccc6ff..78f68dabf 100755 --- a/mode/boss.js +++ b/mode/boss.js @@ -34,7 +34,7 @@ mode.boss={ } } } - lib.init.css('layout/mode','boss'); + lib.init.css(lib.assetURL+'layout/mode','boss'); game.delay(0.1); "step 2" var bosslist=ui.create.div('#bosslist.hidden'); diff --git a/mode/chess.js b/mode/chess.js index 5d4e13ff5..ed4041a73 100755 --- a/mode/chess.js +++ b/mode/chess.js @@ -17,7 +17,7 @@ mode.chess={ } } } - lib.init.css('layout/mode','chess'); + lib.init.css(lib.assetURL+'layout/mode','chess'); ui.chesssheet=document.createElement('style'); document.head.appendChild(ui.chesssheet); var playback=localStorage.getItem(lib.configprefix+'playback'); diff --git a/mode/stone.js b/mode/stone.js index dc56f6856..656675e9f 100755 --- a/mode/stone.js +++ b/mode/stone.js @@ -2,7 +2,7 @@ mode.stone={ start:function(){ "step 0" - lib.init.css('layout/mode/','stone'); + lib.init.css(lib.assetURL+'layout/mode/','stone'); _status.mode=get.config('stone_mode'); game.initStone(); var playback=localStorage.getItem(lib.configprefix+'playback');