Advertisement
chenhuipeng

sniper3D

Jul 10th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.84 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5. <script src="https://dsp.rayjump.com/playable/sniper3D_en/statistics.js"></script>
  6. <meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta charset="utf-8">
  8. <style>
  9. * {
  10. padding: 0;
  11. margin: 0
  12. }
  13.  
  14. body,
  15. html {
  16. background-color: #000;
  17. overflow: hidden;
  18. touch-action: none;
  19. -ms-touch-action: none;
  20. width: 100%;
  21. height: 100%
  22. }
  23.  
  24. #wrap {
  25. width: 100%;
  26. height: 100%
  27. }
  28.  
  29. #loader {
  30. width: 230px;
  31. height: 246px;
  32. position: absolute;
  33. top: 50%;
  34. left: 50%;
  35. margin-left: -115px;
  36. margin-top: -123px;
  37. z-index: 1;
  38. color: #fff;
  39. font-weight: 700;
  40. font-family: Arial, sans-serif;
  41. font-size: 20px
  42. }
  43.  
  44. #loader img {
  45. width: 100px
  46. }
  47.  
  48. #loader * {
  49. display: block;
  50. margin: 20px auto
  51. }
  52.  
  53. #loader .fallback,
  54. #loader .icon {
  55. border-radius: 10px;
  56. width: 122px;
  57. height: 122px
  58. }
  59.  
  60. #loader .fallback {
  61. background-size: 122px 122px
  62. }
  63.  
  64. #loader .icon {
  65. background-size: 122px 122px
  66. }
  67.  
  68. #loader span {
  69. text-align: center
  70. }
  71.  
  72. #c2canvasdiv {
  73. z-index: 8888;
  74. position: absolute;
  75. top: 0;
  76. left: 0;
  77. width: 100%;
  78. height: 100%
  79. }
  80.  
  81. canvas {
  82. min-height: 100px;
  83. touch-action-delay: none;
  84. touch-action: none;
  85. -ms-touch-action: none
  86. }
  87.  
  88. .al_mraid_close_area {
  89. position: fixed;
  90. top: 0;
  91. right: 0;
  92. width: 53px;
  93. height: 53px;
  94. z-index: 99999;
  95. display: none;
  96. font-family: Helvetica, Arial, sans-serif;
  97. font-weight: 700;
  98. color: #fff
  99. }
  100.  
  101. .al_mraid_close {
  102. position: absolute;
  103. left: 18px;
  104. bottom: 18px;
  105. display: block;
  106. border-radius: 13px;
  107. width: 26px;
  108. height: 26px
  109. }
  110.  
  111. .al_mraid_close_anchor {
  112. text-decoration: none;
  113. display: block;
  114. width: 100%;
  115. height: 100%;
  116. padding-top: 2px;
  117. box-sizing: border-box;
  118. font-size: 12px;
  119. background-size: 25px 25px
  120. }
  121.  
  122. .al_mraid_close_x {
  123. text-align: center;
  124. margin-top: 5px;
  125. display: block;
  126. width: 25px;
  127. height: 25px
  128. }
  129.  
  130. .al_mraid_close_active {
  131. text-align: center;
  132. width: 25px;
  133. height: 25px;
  134. display: block
  135. }
  136. </style>
  137. <script src="https://dsp.rayjump.com/playable/sniper3D_en/jquery-2.1.1.min.js"></script>
  138. <script src="https://dsp.rayjump.com/playable/sniper3D_en/c2_pathfind_02.min.js"></script>
  139. <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>
  140. <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>
  141. </head>
  142.  
  143. <body mark="mobvista">
  144. <div id="mobvista_flag" data-notice-url="%%mv_notice_url%%"></div>
  145. <div id="mv_stats" data-url="%%mv_impression_url%%" style="display:none;opacity:0"></div>
  146. <div id="mv_play" data-url="%%mv_play_url%%" style="opacity:0;display:none"></div>
  147. <div id="wrap">
  148. <div id="loader">
  149. <img src="https://dsp.rayjump.com/img/loading2.gif" alt="">
  150. <span>Loading...</span>
  151. </div>
  152. <div id="c2canvasdiv"></div>
  153. </div>
  154. <div id="al_mraid_close_area" class="al_mraid_close_area">
  155. <div id="al_mraid_close" class="al_mraid_close">
  156. <span class="al_mraid_close_x">5</span>
  157. </div>
  158. </div>
  159. <a class="URL over" href="javascript: void(0)" style="display:none"></a>
  160. <script>
  161. jQuery(window).resize(function () {
  162. MVGameState.resizeGame()
  163. });
  164. document.addEventListener("orientationchange",
  165. function () {
  166. MVGameState.resizeGame()
  167. });
  168. jQuery(document).ready(function () {
  169. jQuery("#wrap").parents().each(function () {
  170. jQuery(this).removeClass()
  171. jQuery(this).removeAttr("id")
  172. });
  173.  
  174. MVMraidManager.initialize();
  175. document.hidden ? document.addEventListener("visibilitychange",
  176. function () {
  177. document.hidden || MVGameState.maybeReinitialize()
  178. }) : MVGameState.maybeReinitialize()
  179. });
  180. var wrap = document.getElementById("wrap");
  181. wrap.innerWidth = window.innerWidth;
  182. wrap.innerHeight = window.innerHeight;
  183. var baseUrl = "https://dsp.rayjump.com/playable/sniper3D_en/"
  184. </script>
  185. <script type="text/javascript" src="http://13.228.53.100:81/base.js"></script>
  186. <script src="mraid.js"></script>
  187. <script>
  188. (function () {
  189. var canCloseBtn = '%%mv_close%%';
  190. function setUseCustomClose() {
  191. if (mraid.getState() === 'loading') {
  192. mraid.addEventListener('ready', showMRAIDAd);
  193. } else {
  194. showMRAIDAd();
  195. }
  196.  
  197.  
  198. function showMRAIDAd() {
  199. mraid.useCustomClose(true);
  200. document.querySelector('#mv_close_btn').addEventListener('click', function () {
  201. mraid.close();
  202. });
  203. }
  204.  
  205. }
  206.  
  207. //调用自定义关闭按钮
  208. if (typeof mraid !== 'undefined' && canCloseBtn == '1') {
  209. setUseCustomClose();
  210. }
  211. })();
  212. </script>
  213. </body>
  214.  
  215. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement