; 終了確認つき[if exp="confirm('ゲームを終了しますか?')"]
[iscript](function(){ try{ // 1) NW.js(デスクトップ) if (typeof nw!=="undefined" && nw && nw.Window){ nw.Window.get().close(); return; } // 2) Cordova Android if (window.cordova && navigator.app && navigator.app.exitApp){ navigator.app.exitApp(); return; } // 3) それ以外(ブラウザ/iOSなど) window.close(); // 多くの環境では無視される }catch(e){}})();[endscript]
; ブラウザやiOSなど閉じられない環境向けフォールバック[jump storage="end.ks" target=*bye]
[endif]