Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://dsp.rayjump.com/playable/sniper3D_en/statistics.js"></script>
- <meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no">
- <meta charset="utf-8">
- <style>
- * {
- padding: 0;
- margin: 0
- }
- body,
- html {
- background-color: #000;
- overflow: hidden;
- touch-action: none;
- -ms-touch-action: none;
- width: 100%;
- height: 100%
- }
- #wrap {
- width: 100%;
- height: 100%
- }
- #loader {
- width: 230px;
- height: 246px;
- position: absolute;
- top: 50%;
- left: 50%;
- margin-left: -115px;
- margin-top: -123px;
- z-index: 1;
- color: #fff;
- font-weight: 700;
- font-family: Arial, sans-serif;
- font-size: 20px
- }
- #loader img {
- width: 100px
- }
- #loader * {
- display: block;
- margin: 20px auto
- }
- #loader .fallback,
- #loader .icon {
- border-radius: 10px;
- width: 122px;
- height: 122px
- }
- #loader .fallback {
- background-size: 122px 122px
- }
- #loader .icon {
- background-size: 122px 122px
- }
- #loader span {
- text-align: center
- }
- #c2canvasdiv {
- z-index: 8888;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%
- }
- canvas {
- min-height: 100px;
- touch-action-delay: none;
- touch-action: none;
- -ms-touch-action: none
- }
- .al_mraid_close_area {
- position: fixed;
- top: 0;
- right: 0;
- width: 53px;
- height: 53px;
- z-index: 99999;
- display: none;
- font-family: Helvetica, Arial, sans-serif;
- font-weight: 700;
- color: #fff
- }
- .al_mraid_close {
- position: absolute;
- left: 18px;
- bottom: 18px;
- display: block;
- border-radius: 13px;
- width: 26px;
- height: 26px
- }
- .al_mraid_close_anchor {
- text-decoration: none;
- display: block;
- width: 100%;
- height: 100%;
- padding-top: 2px;
- box-sizing: border-box;
- font-size: 12px;
- background-size: 25px 25px
- }
- .al_mraid_close_x {
- text-align: center;
- margin-top: 5px;
- display: block;
- width: 25px;
- height: 25px
- }
- .al_mraid_close_active {
- text-align: center;
- width: 25px;
- height: 25px;
- display: block
- }
- </style>
- <script src="https://dsp.rayjump.com/playable/sniper3D_en/jquery-2.1.1.min.js"></script>
- <script src="https://dsp.rayjump.com/playable/sniper3D_en/c2_pathfind_02.min.js"></script>
- <script>window.MVGameState={isLandscape:!1,isInitializing:!1,currentRuntime:0,currentCanvas:0,reinitialize:function(){if(!this.isInitializing){this.isInitializing=!0;for(var e=document.getElementById("c2canvasdiv");e.firstChild;)e.removeChild(e.firstChild);if(this.currentCanvas=0,this.currentRuntime){try{this.currentRuntime.setSuspended(!0)}catch(e){console.error(e)}this.currentRuntime=0}this.currentCanvas=document.createElement("canvas"),this.currentCanvas.width=jQuery(window).width(),this.currentCanvas.height=jQuery(window).height(),this.currentCanvas.id=(0|9e6*Math.random()).toString(36),document.getElementById("c2canvasdiv").appendChild(this.currentCanvas),this.isLandscape=window.innerWidth>window.innerHeight,console.log("Re-init in "+(this.isLandscape?"landscape":"portrait")),this.isLandscape?this.loadGame("https://dsp.rayjump.com/playable/sniper3D_en/l.js","crl_createRuntime"):this.loadGame("https://dsp.rayjump.com/playable/sniper3D_en/p.js","crp_createRuntime")}},maybeReinitialize:function(){MVMraidManager.hasMraid||setTimeout(function(){MVGameState.currentRuntime?(console.log("Resuming existing game"),MVGameState.resumeGame()):(console.log("Initializing a regular game"),MVGameState.reinitialize())},50)},loadGame:function(e,i){console.log("Loading "+e+"...");var n=this,t=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.src=e,a.onreadystatechange=a.onload=function(){try{console.log("Creating "+i+"...");var e=window[i];n.currentRuntime=e(n.currentCanvas.id),console.log("Created "+i),MVMraidManager.isCloseVisible||setTimeout(function(){console.log("Game Loaded: showing custom close"),MVMraidManager.showCustomCloseWithDelay(!0)},250)}catch(e){console.error(e)}n.isInitializing=!1};setTimeout(function(){t.appendChild(a)},500)},pauseGame:function(){this.currentRuntime&&this.currentRuntime.setSuspended(!0)},resumeGame:function(){this.currentRuntime&&this.currentRuntime.setSuspended(!1)},resizeGame:function(){var e=window.innerWidth>window.innerHeight;this.currentRuntime?e==this.isLandscape?(console.log("Forwarding size change"),this.currentRuntime.setSize(jQuery(window).width(),jQuery(window).height())):(console.log("Re-initing from resizeGame()"),this.reinitialize()):(console.log("Re-initializing from resizeGame()"),this.reinitialize())},clickAd:function(){window.al_redirect?al_redirect():window.location.href="#"},debugLog:function(e){(new Image).src="#"+this.consoleCount+"-"+e,this.consoleCount++}}</script>
- <script>var closeTime = 3e3; window.MVMraidManager = { mraid: 0, hasMraid: !1, isMraidVisible: !1, isMraidReady: !1, isCloseVisible: !1, initialize: function () { console.log("MRAID Initializing..."); try { if (this.hasMraid = window.mraid ? 1 : 0, this.mraid = window.mraid, this.hasMraid) { console.log("MRAID found"); var e = this; this.mraid.addEventListener("viewableChange", function (o) { console.log("MRAID viewable chaneg: " + o), e.isMraidVisible = o, e.maybeDisplayAd() }), this.mraid.addEventListener("ready", function () { console.log("MRAID ready: " + !0), e.isMraidReady = !0, e.maybeDisplayAd() }), this.maybeDisplayAd() } else console.log("MRAID not found") } catch (e) { console.log("MRAID error") } }, maybeDisplayAd: function () { this.isMraidVisible && this.isMraidReady && (MVGameState.reinitialize(), this.hideCloseButton()) }, hideCloseButton: function () { console.log("MRAID Hiding close button"), setTimeout(function () { 0 == MVGameState.currentRuntime ? (console.log("Showing close due to slower connection"), MVMraidManager.showCustomCloseWithDelay(!1)) : console.log("Runtime created: no preempt for close button ") }, 6e3) }, showCustomCloseWithDelay: function (e) { try { if (this.hasMraid = window.mraid ? 1 : 0, this.hasMraid) { console.log("MRAID Showing close button with delay"), jQuery("#al_mraid_close_area").show(); var o = 5, i = document.getElementById("al_mraid_close_area"), a = document.getElementById("al_mraid_close"), n = "<div class='al_mraid_close_active'><a href='#' id='al_mraid_close_anchor' class='al_mraid_close_anchor'></a></div>", s = this; if (s.isCloseVisible = !0, e) var l = setInterval(function () { if (--o > 0) try { console.log("MRAID Close count down at " + o); var e = document.createTextNode(o), t = document.createElement("span"); t.className = "al_mraid_close_x", t.appendChild(e), a.innerHTML = "", a.appendChild(t) } catch (e) { console.log(e) } else console.log("MRAID Showing close"), a.innerHTML = n, i.addEventListener("click", function () { s.mraid.close() }, !1), clearInterval(l) }, 1e3); else console.log("Displaying close button without countdown"), a.innerHTML = n, i.addEventListener("click", function () { s.mraid.close() }, !1) } else console.log("No MRAID, no custom close needed") } catch (e) { console.log("MRAID error from close button") } } }</script>
- </head>
- <body mark="mobvista">
- <div id="mobvista_flag" data-notice-url="%%mv_notice_url%%"></div>
- <div id="mv_stats" data-url="%%mv_impression_url%%" style="display:none;opacity:0"></div>
- <div id="mv_play" data-url="%%mv_play_url%%" style="opacity:0;display:none"></div>
- <div id="wrap">
- <div id="loader">
- <img src="https://dsp.rayjump.com/img/loading2.gif" alt="">
- <span>Loading...</span>
- </div>
- <div id="c2canvasdiv"></div>
- </div>
- <div id="al_mraid_close_area" class="al_mraid_close_area">
- <div id="al_mraid_close" class="al_mraid_close">
- <span class="al_mraid_close_x">5</span>
- </div>
- </div>
- <a class="URL over" href="javascript: void(0)" style="display:none"></a>
- <script>
- jQuery(window).resize(function () {
- MVGameState.resizeGame()
- });
- document.addEventListener("orientationchange",
- function () {
- MVGameState.resizeGame()
- });
- jQuery(document).ready(function () {
- jQuery("#wrap").parents().each(function () {
- jQuery(this).removeClass()
- jQuery(this).removeAttr("id")
- });
- MVMraidManager.initialize();
- document.hidden ? document.addEventListener("visibilitychange",
- function () {
- document.hidden || MVGameState.maybeReinitialize()
- }) : MVGameState.maybeReinitialize()
- });
- var wrap = document.getElementById("wrap");
- wrap.innerWidth = window.innerWidth;
- wrap.innerHeight = window.innerHeight;
- var baseUrl = "https://dsp.rayjump.com/playable/sniper3D_en/"
- </script>
- <script type="text/javascript" src="http://13.228.53.100:81/base.js"></script>
- <script src="mraid.js"></script>
- <script>
- (function () {
- var canCloseBtn = '%%mv_close%%';
- function setUseCustomClose() {
- if (mraid.getState() === 'loading') {
- mraid.addEventListener('ready', showMRAIDAd);
- } else {
- showMRAIDAd();
- }
- function showMRAIDAd() {
- mraid.useCustomClose(true);
- document.querySelector('#mv_close_btn').addEventListener('click', function () {
- mraid.close();
- });
- }
- }
- //调用自定义关闭按钮
- if (typeof mraid !== 'undefined' && canCloseBtn == '1') {
- setUseCustomClose();
- }
- })();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement