diff --git a/app/src/main/assets/view/m.js b/app/src/main/assets/view/m.js index 17016841..1d8a29d1 100644 --- a/app/src/main/assets/view/m.js +++ b/app/src/main/assets/view/m.js @@ -2464,9 +2464,15 @@ const _API={ return; } _API.fullscreenEl=$n('c','electron-fullscreen',null,$('animetv'),''); - _API.fullscreenEl.onclick=function(){ - _JSAPI.toggleFullscreen(); - }; + /* set kiosk */ + if (_JSAPI.varGet("kiosk","0")){ + _API.fullscreenEl.style.display='none'; + } + else{ + _API.fullscreenEl.onclick=function(){ + _JSAPI.toggleFullscreen(); + }; + } _API.fullscreenCb(_JSAPI.getFullscreen()); }, fullscreenCb:function(s){ diff --git a/electron/src/animetv.js b/electron/src/animetv.js index 573f490b..094bec7e 100644 --- a/electron/src/animetv.js +++ b/electron/src/animetv.js @@ -53,6 +53,11 @@ const main={ main.vars.fullscreen=(main.vars.initwinstate==2); } main.vars.dns=common.dns; + + if (process.argv[process.argv.length-1]=="kiosk"){ + main.vars.kiosk=1; + main.vars.fullscreen=true; + } /* Create new window */ main.win=new BrowserWindow({ @@ -74,7 +79,7 @@ const main={ preload: common.path("/electron/src/preload.js"), } }); - if (main.vars.initwinstate==1){ + if (!main.vars.kiosk && main.vars.initwinstate==1){ /* maximized */ main.win.maximize(); } @@ -120,6 +125,7 @@ const main={ sd_domain:'', fullscreen:false, initwinstate:0, + kiosk:0, }, handlerIntent(e,d){ shell.openExternal(d); @@ -199,6 +205,9 @@ const main={ return path.join(app.getAppPath(), filename); }, fullScreen(stat){ + if (main.vars.kiosk){ + return; + } if (process.platform !== "darwin"){ main.win.setFullScreen(stat); }