drive mad
11
drivemad/Jump_Gamemonetize.js
Normal file
43
drivemad/background.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
const installUrl = "https://drunk-game.com/";
|
||||||
|
const uninstallUrl = "https://drunk-game.com/";
|
||||||
|
|
||||||
|
|
||||||
|
class ExtBackground {
|
||||||
|
|
||||||
|
initialize() {
|
||||||
|
chrome.runtime.onInstalled.addListener(
|
||||||
|
(details) => this.onInstalled(details));
|
||||||
|
|
||||||
|
if (uninstallUrl) {
|
||||||
|
chrome.runtime.setUninstallURL(uninstallUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
onInstalled(details) {
|
||||||
|
if (details.reason == "install") {
|
||||||
|
chrome.tabs.create({
|
||||||
|
url: `${installUrl}`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
new ExtBackground().initialize();
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
|
||||||
|
console.log(request.method)
|
||||||
|
if (request.method == "runtimeID")
|
||||||
|
sendResponse("ok");
|
||||||
|
});
|
||||||
|
|
||||||
|
chrome.action.onClicked.addListener((_reason) => {
|
||||||
|
chrome.tabs.create({
|
||||||
|
url: 'slope.html'
|
||||||
|
});
|
||||||
|
});
|
8
drivemad/ext.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
setTimeout(function(){
|
||||||
|
document.getElementById("popupPlay").style.display = "none";
|
||||||
|
}, 6000);
|
||||||
|
function hiddenPopup(){
|
||||||
|
document.getElementById("popupPlay").style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById("popupPlay").addEventListener("click", hiddenPopup);
|
BIN
drivemad/icons/icon-128.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
drivemad/icons/icon-16.png
Normal file
After Width: | Height: | Size: 839 B |
BIN
drivemad/icons/icon-192.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
drivemad/icons/icon-24.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
drivemad/icons/icon-256.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
drivemad/icons/icon-32.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
drivemad/icons/icon-48.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
drivemad/icons/icon-512.png
Normal file
After Width: | Height: | Size: 229 KiB |
BIN
drivemad/icons/icon-64.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
drivemad/icons/icon-72.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
drivemad/icons/icon-96.png
Normal file
After Width: | Height: | Size: 15 KiB |
46
drivemad/index.html
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<title>Drive Mad</title>
|
||||||
|
<script type="text/javascript" src="Jump_Gamemonetize.js"></script>
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="google" content="notranslate">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||||
|
<link rel="stylesheet" href="webapp/fancade.css">
|
||||||
|
<link rel="icon" href="">
|
||||||
|
<script src="/js/all.js"></script>
|
||||||
|
</head>
|
||||||
|
<body id="body">
|
||||||
|
<div id="modal_parent">
|
||||||
|
<div id="modal_content">
|
||||||
|
<span id="modal_close_button">×</span>
|
||||||
|
<div id="store_link_modal_content" class="modal_inner"></div>
|
||||||
|
<div id="share_file_modal_content" class="modal_inner"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="canvas_border" class="emscripten_border">
|
||||||
|
<div id="play_content" class="middle center">
|
||||||
|
<div class="edge">
|
||||||
|
<div class="box">
|
||||||
|
<div class="black">
|
||||||
|
<img src="webapp/cover.jpg" class="cover">
|
||||||
|
<p class="title">Drive Mad Unblocked</p>
|
||||||
|
<p class="author">Martin Magni</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="progress_or_play">
|
||||||
|
<progress id="progress" class="loading" value="0" max="100"></progress>
|
||||||
|
</div>
|
||||||
|
<p class="description"></p>
|
||||||
|
</div>
|
||||||
|
<canvas class="emscripten" id="canvas" tabindex="-1"></canvas>
|
||||||
|
<div id="gradient"></div>
|
||||||
|
<div id="webview_content"></div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="webapp/source_min.js"></script>
|
||||||
|
<script type="text/javascript" src="webapp/index.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
46
drivemad/manifest.json
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
"manifest_version": 3,
|
||||||
|
"name": "Rolling Ball 3D for Chrome™",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"description": "You play as a ball that must navigate a variety of obstacles in the entertaining and hard 3D game called Rolling Ball 3D",
|
||||||
|
"homepage_url": "https://drunk-game.com/game/rolling-ball-3d-unblocked/",
|
||||||
|
"background": {
|
||||||
|
"service_worker": "background.js"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"default_title": "Slope Unblocked",
|
||||||
|
"default_icon": {
|
||||||
|
"512": "icons/icon-512.png",
|
||||||
|
"256": "icons/icon-256.png",
|
||||||
|
"128": "icons/icon-128.png",
|
||||||
|
"64": "icons/icon-64.png",
|
||||||
|
"48": "icons/icon-48.png",
|
||||||
|
"32": "icons/icon-32.png",
|
||||||
|
"16": "icons/icon-16.png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_security_policy": {
|
||||||
|
"extension_pages": "script-src 'self' ; object-src 'self'; child-src 'self'; worker-src 'self'",
|
||||||
|
"sandbox": "sandbox allow-scripts; script-src 'self' 'unsafe-eval' blob: 'unsafe-inline'; object-src 'self' 'unsafe-eval' blob: 'unsafe-inline';child-src 'self' 'unsafe-eval' blob: 'unsafe-inline' ; worker-src 'self' 'unsafe-eval' blob: 'unsafe-inline'; script-src-elem 'self' 'unsafe-eval' blob: 'unsafe-inline'"
|
||||||
|
},
|
||||||
|
"sandbox": {
|
||||||
|
"pages": [
|
||||||
|
"index.html"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"icons": {
|
||||||
|
"512": "icons/icon-512.png",
|
||||||
|
"256": "icons/icon-256.png",
|
||||||
|
"128": "icons/icon-128.png",
|
||||||
|
"64": "icons/icon-64.png",
|
||||||
|
"48": "icons/icon-48.png",
|
||||||
|
"32": "icons/icon-32.png",
|
||||||
|
"16": "icons/icon-16.png"
|
||||||
|
}
|
||||||
|
}
|
1
drivemad/rate.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
document.querySelector('#rate').href = `https://chrome.google.com/webstore/detail/${chrome.runtime.id}/reviews`;
|
BIN
drivemad/screenshots/Screenshot 2023-04-12 at 16.49.27.png
Normal file
After Width: | Height: | Size: 125 KiB |
BIN
drivemad/screenshots/Screenshot 2023-04-12 at 16.49.36.png
Normal file
After Width: | Height: | Size: 144 KiB |
BIN
drivemad/webapp/cover.jpg
Normal file
After Width: | Height: | Size: 10 KiB |
1
drivemad/webapp/fancade.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
@font-face{font-family:'baloo 2';font-style:normal;font-weight:800;font-display:swap;src:url(baloo2.woff) format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.fullscreen{position:absolute;width:100%;height:100%}.center{text-align:center}.centered{margin-left:auto;margin-right:auto;display:block;text-align:center}#play_overlay{display:none;z-index:10}.middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.middle_vertical{position:absolute;top:50%;transform:translate(0%,-50%)}.edge{margin-left:auto;margin-right:auto;width:164px;height:180px;background-color:#cfdaed;box-shadow:5px 1px 5px rgba(0,0,0,.25);transform:rotate(-5deg)}.box{width:164px;height:164px;background-color:#fff;position:relative}.black{width:132px;height:156px;background-color:#000;position:absolute;top:4px;right:4px;margin:0 auto}.cover{width:128px;height:128px;margin:2px}.title{font-size:14px;font-family:'baloo 2',ubuntu,verdana,sans-serif}.author{font-family:'baloo 2',ubuntu,verdana,sans-serif;border-spacing:0;font-size:14px;color:#ccc;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:absolute;width:150px;top:4px;right:142px;transform-origin:right top;transform:rotate(-90deg)}.loading{margin-top:20px;margin-bottom:10px}.description{font-family:'baloo 2',ubuntu,verdana,sans-serif;display:inline-block;font-size:16px;line-height:1.2em;width:240px}.button{display:inline-block;border:2px solid #00a2ff;border-radius:7px;width:133px;height:43px;font-size:16px;line-height:43px;margin:0 auto}.overlay_button{display:inline-block;border:2px solid #000;border-radius:12px;width:200px;height:50px;font-size:18px;line-height:50px;margin:11px}#play_button{color:#333;background-color:#eee}.emscripten_border{position:relative}#gradient{background-image:linear-gradient(135deg,#70e1fd,#00a2ff);position:absolute;top:0;width:100%;height:768px}*{margin:0;padding:0}p,ul,ol,dl{margin-bottom:1em}h1,h2,h3,h4,h5,h6,p,ul,ol,dl{margin-left:16px;margin-right:16px}img{vertical-align:top}html,body{font-family:'baloo 2',ubuntu,verdana,sans-serif;font-size:18px;color:#bbb;padding:0;width:100%;height:100%;margin:0;border:0;line-height:1.8;overflow:hidden;display:block}canvas{padding-right:0;margin-left:auto;margin-right:auto;display:block;margin-top:auto;margin-bottom:auto;position:relative;width:1024px;height:768px}div.emscripten{text-align:center}canvas.emscripten{border:0;background-color:#000}#status{display:inline-block;width:100%;font-weight:700;color:#787878;text-align:center}#modal_parent{display:none;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4)}.modal_inner{display:none}#play_content{color:#fff;z-index:10}#modal_content{position:relative;background-color:#fefefe;margin:auto;padding:20px;border:1px solid #888;box-sizing:border-box}.error_message{color:red}.error_text{color:red;font-family:sans-serif;font-size:.8em}#modal_close_button{color:#aaa;position:absolute;right:15px;top:10px;font-size:28px;line-height:28px;font-weight:700;transition:.2s}#modal_close_button:hover,#modal_close_button:focus{color:#000;text-decoration:none;cursor:pointer}a:link{color:#00b9fe;text-decoration:none;transition:.2s}a:visited{color:#00b9fe}a:hover,a:active{opacity:.5}.link_image_button{margin-right:10px}.playstore075{width:153px;height:45px}.appstore075{width:135px;height:45px}#progress_or_play{margin-top:10px}#terms_p{font-family:sans-serif;color:#141414;font-size:.7em;margin-bottom:0}#terms_p a{color:#f0f0f0}.deeplink_message{font-size:1em;color:#f0f0f0;line-height:1.1em;font-size:20px}.menu{color:#f0f0f0}.level_button{border:2px solid #222;border-radius:1em;color:#f0f0f0;background-color:#00a2ff;line-height:1em;height:2.5em;width:5em;justify-self:center;position:relative;padding-top:.6em}.grid_element_center{justify-self:center}.level_button_name{font-size:.6em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.level_button_number{font-size:1.2em}.level_button:hover{background-color:#00c2ff}.level_checkmark{position:absolute;right:0;top:0;margin:0;padding:0;text-align:right;font-size:1.2em;line-height:1.2em}.level_button a{color:#f0f0f0;opacity:1}.menu_items{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:20px}.menu_header{font-size:3em;margin-top:40px}#webview_content{display:none;background-color:transparent;position:absolute;top:0;width:100%;height:768px}.webview{width:100%;height:100%;background:0 0;margin:0;border:0;overflow:hidden}
|
BIN
drivemad/webapp/index.data
Normal file
771
drivemad/webapp/index.js
Normal file
BIN
drivemad/webapp/index.wasm
Normal file
67
drivemad/webapp/source_min.js
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
var pokiDebug=false;var postRunDone=false;var theDomLoaded=false;var pokiInited=false;var gameReadyToStart=false;var requestedCanvas=false;var adblocker=false;var gameStarted=false;var updatedScreenSize=false;var startupTimeStr="";var loadProgressFrac=0;var fakeProgressPercentStart=80+Math.random()*15;window.addEventListener('DOMContentLoaded',domContentLoaded);window.addEventListener('load',function(){console.log("Load event received");if(inIframe()){document.addEventListener('click',ev=>{let canvas=document.getElementById('canvas');if(canvas){canvas.focus();}});}});function inIframe(){try{return window.self!==window.top;}catch(e){return true;}}
|
||||||
|
function updateLoadProgress(){let progressElement=document.getElementById('progress');if(progressElement){progressElement.value=Math.round(loadProgressFrac*fakeProgressPercentStart);progressElement.max=100;}
|
||||||
|
if(loadProgressFrac>=1){console.log("Loading done");tryStartGame();}}
|
||||||
|
function domContentLoaded(){initPokiSdk();console.log("DOM content loaded event received");let canvas=document.getElementById('canvas');canvas.addEventListener("contextmenu",stopContextMenu);if(!postRunDone){resizeCanvas(false);}
|
||||||
|
window.addEventListener('blur',ev=>setGameFocus(false));window.addEventListener('focus',ev=>setGameFocus(true));canvas.onpointerdown=beginPointerDrag;canvas.onpointerup=endPointerDrag;theDomLoaded=true;}
|
||||||
|
function beginPointerDrag(e){let canvas=document.getElementById('canvas');canvas.setPointerCapture(e.pointerId);}
|
||||||
|
function endPointerDrag(e){let canvas=document.getElementById('canvas');canvas.releasePointerCapture(e.pointerId);}
|
||||||
|
function setGameFocus(f){if(postRunDone){Module.ccall('set_game_focus','v',['number'],[f]);}}
|
||||||
|
function canBeGameGuid(str){return str&&str.match('([A-F]|[0-9]){16}');}
|
||||||
|
function getMeta(metaName){const metas=document.getElementsByTagName('meta');for(let i=0;i<metas.length;i++){if(metas[i].getAttribute('name')===metaName){return metas[i].getAttribute('content');}}
|
||||||
|
return '';}
|
||||||
|
function getCSSRgb(color){return `rgb(${Math.round(color[0])}, ${Math.round(color[1])}, ${Math.round(color[2])})`;}
|
||||||
|
let lastGradientStyleStr="";let lastDeepLinkLoadFraction=0;function getGradientStr(frac){let fromColor=[frac*0x70,frac*0xe1,frac*0xfd];let toColor=[frac*0x00,frac*0xa2,frac*0xff];let str=`linear-gradient(135deg, ${getCSSRgb(fromColor)}, ${getCSSRgb(toColor)})`
|
||||||
|
return str;}
|
||||||
|
function hideOverlayGradient(){var gradient=document.getElementById('gradient');gradient.style.display="none";}
|
||||||
|
var showedStartGameError=false;function setPokiInited(){pokiInited=true;}
|
||||||
|
function initPokiSdk(){setPokiInited();}
|
||||||
|
function hideOverlay(){var playContent=document.getElementById('play_content');playContent.style.display="none";hideOverlayGradient();}
|
||||||
|
function startGame(){try{console.log("Registering event listeners");window.addEventListener("beforeunload",function(event){Module.ccall('app_terminate_if_necessary','v');});window.addEventListener("unload",function(event){Module.ccall('app_terminate_if_necessary','v');});document.addEventListener("visibilitychange",function(){if(document.visibilityState==='visible'){Module.ccall('app_resume','v');}else{Module.ccall('app_pause','v');}});console.log("Confirming accept in app");try{Module.ccall('user_accepted_and_clicked','v');Module.ccall('set_is_mobile','v',['number'],[matchMedia('(pointer:coarse)').matches]);}catch(err4){}
|
||||||
|
gameStarted=true;if(!updatedScreenSize){resizeCanvas(true);}}catch(err){if(!showedStartGameError){let foundModuleAsm=false;let additionalInfo="";try{if(Module["asm"]){foundModuleAsm=true;}}catch(err2){}
|
||||||
|
if(!foundModuleAsm){additionalInfo+="Could not find Module.asm";}
|
||||||
|
console.log(`Error when starting game. Try to reload the page. Error message: ${err}. ${additionalInfo}`);showedStartGameError=true;}}}
|
||||||
|
var pokiStopped=true;function pokiEnsureStop(){if(!pokiStopped){pokiStopped=true;}}
|
||||||
|
function pokiEnsureStart(){if(pokiStopped){pokiStopped=false;}}
|
||||||
|
var startGameAttempts=0;var tryStartGameTimeout=null;function tryStartGame(){console.log("tryStartGame()",gameReadyToStart);if(gameReadyToStart){return;}
|
||||||
|
if(!postRunDone||!theDomLoaded||!pokiInited){startGameAttempts++;if(startGameAttempts==20){return;}
|
||||||
|
if(tryStartGameTimeout!=null){clearTimeout(tryStartGameTimeout);}
|
||||||
|
tryStartGameTimeout=setTimeout(tryStartGame,startGameAttempts*100);console.log("Not ready to start game yet...");return;}
|
||||||
|
gameReadyToStart=true;console.log("Starting game");startGame();}
|
||||||
|
function simpleLogC(str){if(postRunDone){Module.ccall('log_simple','v',['string'],[str]);}else{console.log(str);}}
|
||||||
|
function appErrorC(code,str){if(postRunDone){Module.ccall('app_error','v',['number','string'],[code,str]);}else{console.error(str,code);}}
|
||||||
|
function simpleAppErrorC(str){appErrorC(1,str);}
|
||||||
|
function parseUrlArgument(name){let result="";let str=window.location.search;if(str.length>0&&str[0]=='?'){var arr=str.substr(1).split('&');for(let i=0;i<arr.length;i++){if(arr[i].startsWith(name+"=")){result=arr[i].substr(name.length+1);break;}}}
|
||||||
|
return result;}
|
||||||
|
function parseUrlArgumentInt(name){let str=parseUrlArgument(name);let parsed=parseInt(str);if(isNaN(parsed)){return 0;}else{return parsed;}}
|
||||||
|
function resizeCanvas(informC){let iw=window.innerWidth;let ih=window.innerHeight;let canvas=document.getElementById('canvas');let border=document.getElementById('canvas_border');canvas.width=iw*window.devicePixelRatio;canvas.height=ih*window.devicePixelRatio;border.style.marginTop='0px';let gradient=document.getElementById("gradient");let webViewContent=document.getElementById("webview_content");[gradient,webViewContent].forEach(e=>{if(e){e.style.left='0px';}});[canvas,gradient,webViewContent].forEach(e=>{if(e){e.style.width=iw+'px';e.style.height=ih+'px';e.style.borderRadius='0px';}});if(informC&&gameStarted&&requestedCanvas){Module.ccall("update_screen_size","v",["number","number","number"],[canvas.width,canvas.height,window.devicePixelRatio]);updatedScreenSize=true;}}
|
||||||
|
function stopContextMenu(event){event.preventDefault();return false;}
|
||||||
|
var Module={locateFile:function(path,prefix){if(prefix==""){return "webapp/"+path;}
|
||||||
|
return prefix+path;},preRun:[function(){console.log("preRun() called");}],postRun:[function(){console.log("postRun() called");document.onfullscreenchange=function(){setTimeout(function(){resizeCanvas(true);if(document.fullscreenElement&&gameStarted&&requestedCanvas){let canvas=document.getElementById('canvas');Module.ccall("update_screen_size","v",["number","number","number"],[canvas.width,canvas.height,1]);}},500);};window.addEventListener('resize',(event)=>resizeCanvas(true),false);if(theDomLoaded){resizeCanvas(true);}
|
||||||
|
console.log("Registering keydown listener");window.addEventListener('keydown',e=>{ccall("keydown_browser","v",["string"],[e.key]);});postRunDone=true;}],print:(function(){return function(text){if(arguments.length>1)text=Array.prototype.slice.call(arguments).join(' ');console.log(text);};})(),printErr:function(text){if(arguments.length>1)text=Array.prototype.slice.call(arguments).join(' ');console.error(text);},canvas:(function(){var canvas=document.getElementById('canvas');canvas.addEventListener("webglcontextlost",function(e){alert('WebGL context lost. You will need to reload the page.');e.preventDefault();},false);requestedCanvas=true;return canvas;})(),setStatus:function(text){if(!Module.setStatus.last)Module.setStatus.last={time:Date.now(),text:''};if(text===Module.setStatus.last.text)return;var m=text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);var now=Date.now();if(m&&now-Module.setStatus.last.time<30)return;Module.setStatus.last.time=now;Module.setStatus.last.text=text;if(m){text=m[1];loadProgressFrac=parseInt(m[2])/parseInt(m[4]);}else{loadProgressFrac=1;}
|
||||||
|
updateLoadProgress();},totalDependencies:0,monitorRunDependencies:function(left){this.totalDependencies=Math.max(this.totalDependencies,left);}};var notifications=[];var webViewIframe=null;var storedScripts=[];var webviewDomLoaded=false;async function isUrlFound(url){try{const response=await fetch(url,{method:'HEAD',cache:'no-cache'});return response.status===200;}catch(error){return false;}}
|
||||||
|
function checkHintFileExist(src,li){isUrlFound(src).then(found=>{if(found){Module.ccall("hint_file_exists","v",["number"],[li]);}});}
|
||||||
|
function postStored(){for(var i=0;i<storedScripts.length;i++){webViewIframe.contentWindow.postMessage("eval:"+storedScripts[i],'*');}
|
||||||
|
storedScripts=[];}
|
||||||
|
function onWebviewDomContentLoaded(){webviewDomLoaded=true;postStored();}
|
||||||
|
function webViewPostMessage(message){Module.ccall("app_webview_message","v",["string"],[message]);}
|
||||||
|
function webViewError(type,message){webViewPostMessage(`error|${type}|${message}`);}
|
||||||
|
function webViewClose(){try{var content=document.getElementById("webview_content");content.style.display='none';if(content.contains(webViewIframe)){webviewDomLoaded=false;webViewIframe.contentWindow.removeEventListener('DOMContentLoaded',onWebviewDomContentLoaded);content.removeChild(webViewIframe);}
|
||||||
|
setTimeout(function(){Module.ccall("set_game_focus","v",["number"],[true])},100);}catch(err){webViewError("unknown",err);}}
|
||||||
|
function webViewOpen(path){try{let arr=readLocalFile(path);let html=new TextDecoder("utf-8").decode(arr);if(webViewIframe==null){window.onmessage=function(e){webViewPostMessage(e.data);}}
|
||||||
|
html=html.replace("common.js",`webapp/view_common.js`);html=html.replace("common.css",`webapp/view_common.css`);var content=document.getElementById("webview_content");content.style.display='block';webViewIframe=document.createElement('iframe');webViewIframe.classList.add('webview');webViewIframe.allowtransparency=true;content.appendChild(webViewIframe);webViewIframe.contentWindow.document.open();webviewDomLoaded=false;webViewIframe.contentWindow.addEventListener('DOMContentLoaded',onWebviewDomContentLoaded);webViewIframe.contentWindow.document.write(html);webViewIframe.contentWindow.document.close();}catch(err){webViewError("unknown",err);}}
|
||||||
|
function webViewExecuteJS(jsString){try{if(!webviewDomLoaded){storedScripts.push(jsString);}else{webViewIframe.contentWindow.postMessage("eval:"+jsString,'*');}}catch(err){webViewError("unknown",err);}}
|
||||||
|
function getHostname(){let hostname=window.location.hostname.split(':')[0];let lengthBytes=lengthBytesUTF8(hostname)+1;let stringOnWasmHeap=_malloc(lengthBytes);stringToUTF8(hostname,stringOnWasmHeap,lengthBytes);return stringOnWasmHeap;}
|
||||||
|
function parseUrlArgumentString(name){let str=parseUrlArgument(name);let lengthBytes=lengthBytesUTF8(str)+1;let stringOnWasmHeap=_malloc(lengthBytes);stringToUTF8(str,stringOnWasmHeap,lengthBytes);return stringOnWasmHeap;}
|
||||||
|
function writeLocalFile(buffer,pathDevice){let arr=new Uint8Array(buffer);let stream=FS.open(pathDevice,'w');FS.write(stream,arr,0,arr.length,0);FS.close(stream);}
|
||||||
|
function readLocalFile(path){let stream=FS.open(path,'r');FS.llseek(stream,0,2);let fileSize=stream.position;FS.llseek(stream,0,0);let buf=new Uint8Array(fileSize);FS.read(stream,buf,0,fileSize,0);FS.close(stream);return buf;}
|
||||||
|
function resizeModal(modal,modalContent,maxWidth){let iw=window.innerWidth;let ih=window.innerHeight;let top=Math.min(0.15*ih,100);let w=Math.min(iw,maxWidth);modal.style.display="block";modalContent.style.width=w+"px";modal.style.paddingTop=top+"px";return w;}
|
||||||
|
function fetchUrl(url,id,useToken){}
|
||||||
|
function adInit(){setTimeout(()=>Module.ccall("ad_on_inited","v"),100);}
|
||||||
|
function firebasePause(){}
|
||||||
|
function firebaseResume(){}
|
||||||
|
function adInterstitialLoad(){setTimeout(()=>Module.ccall("ad_interstitial_on_loaded","v",["number"],[1]),100);}
|
||||||
|
function adInterstitialShow(){Module.ccall("ad_interstitial_on_showed","v",["number"],[1]);}
|
||||||
|
function adRewardedLoad(){setTimeout(()=>Module.ccall("ad_rewarded_on_loaded","v",["number"],[1]),100);}
|
||||||
|
function adRewardedShow(){pokiEnsureStop();Module.ccall("ad_rewarded_on_reward","v");Module.ccall("ad_rewarded_on_showed","v",["number"],[true]);}
|
||||||
|
function firebaseDeinit(){}
|
||||||
|
function currentTimeSecondsRound(){return Math.round(Date.now()/1000);}
|
@ -849,5 +849,10 @@
|
|||||||
"name": "Skibidi 1 v 100",
|
"name": "Skibidi 1 v 100",
|
||||||
"directory": "skibiditoilet",
|
"directory": "skibiditoilet",
|
||||||
"image": "logo.png"
|
"image": "logo.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Drive Mad",
|
||||||
|
"directory": "drivemad",
|
||||||
|
"image": "icons/icon-128.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|