daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #BEGIN CLIENTCODE
  3. #BEGIN JAVASCRIPT
  4. var adblocking=0;
  5. function adblock(){
  6.     var xhttp = new XMLHttpRequest ();
  7.     xhttp.onreadystatechange = function () {
  8.    
  9.         if (this.readyState === 4 && this.status === 0)
  10.         {
  11.             console.log("The user is adblocking");
  12.     //      this.sendPacket('a',1) //disable functionality if user is adblocking
  13.             VS.global.adblocking=1;
  14.             VS.global.client.AdblockDetect(1)
  15.             console.log(VS.global.adblocking + ' one')
  16.         }
  17.     //      VS.client.AdblockDetect(1)
  18.         if(this.readyState ===4 && this.status ===200)
  19.         {
  20.             console.log("The user is not adblocking");
  21.             VS.global.adblocking=0;
  22.             VS.global.client.AdblockDetect(0)
  23.             console.log(VS.global.adblocking+ ' two')
  24.         }
  25.     }
  26.     xhttp.open ("GET", "https://api.adinplay.com/libs/aiptag/assets/adsbygoogle.js", true);
  27.     xhttp.send ();
  28. }
  29.  
  30. function isAdblocking()
  31. {
  32.    
  33. }
  34.  
  35. var cpmstar_anchorad_settings = {
  36. poolid: 80241, //Pool ID assigned by CPMStar
  37. dir: 1
  38. };
  39. function callanchorad(){
  40.     (function (d, t, s) { t = d.createElement('script'); t.type = 'text/javascript'; t.src = (d.location.protocol == 'https:'?'//server':'//cdn') + '.cpmstar.com/cached/js/anchorad_v100.pack.js'; t.async = true; s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(t, s); })(document, {}, {});
  41. }
  42. callanchorad();
  43.  
  44.   (function(zonefile) {
  45.         var rnd = Math.round(Math.random()*999999);
  46.         var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true;
  47.         var proto = document.location.protocol;
  48.         if(proto == "file:") proto = "https:"
  49.         var host = ( proto == "https:")?"https://server":"//cdn";        
  50.         if(window.location.hash=="#cpmstarDev") host = proto+"//dev.server";
  51.         if(window.location.hash=="#cpmstarStaging") host = proto+"//staging.server";
  52.         s.src = host + ".cpmstar.com/cached/zonefiles/" + zonefile + ".js?rnd="+rnd;
  53.         var s2=document.getElementsByTagName('script')[0];
  54.         s2.parentNode.insertBefore(s, s2);
  55.         var y=window.location.href.split('#')[0].split('').reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)>>>1},0);y=(10+((y*7)%26)).toString(36)+y.toString(36);
  56.         var drutObj = window[y] = window[y] || {};
  57.         window.cpmstarAPI = function(o) { (drutObj.cmd = drutObj.cmd || []).push(o); }
  58.         }('68_48304_erigatospace'));
  59. //68_48304_erigatospace 170_49210_gameapi
  60.  
  61. (function (i, w, d, p, c, e, o, a, s, t) {
  62.         cpmstar_instreamAd = null; // global variable for instream ad
  63.         p.poolid = 80324; // your poolid
  64.         o.select = '#overlay'; // specify the element to overlay
  65.         c.type = 'game';
  66.         t = d.getElementsByTagName('script');
  67.         sid = 'cpmstarfr' + Math.round(Math.random() * 999999);
  68.         if (!w[i]) { w[i] = { instreamAds: [] }; s = d.createElement('script'); s.src = (d.location.protocol == 'https:' ? '//server' : '//cdn') + '.cpmstar.com/cached/js/global_v100.pack.js?poolid=' + p.poolid; s.type = 'text/javascript'; s.async = ''; t[0].parentNode.insertBefore(s, t[0]); }
  69.         w[i].instreamAds.push(a = { params: p, config: c, events: e, overlay: o, placeholder: t[t.length - 1], scriptid: sid });
  70.     })('cpmstarinstream', window, document, {}, {}, {}, {});
  71.  
  72.         function vidad(el) {
  73.         console.log("Game started");
  74.                 }  
  75.          var adstuff;
  76.          cpmstarAPI(function(api) {                        
  77.             api.game.setTarget(document.body);
  78.         });              
  79.         var game = vidad(document.body);        
  80.         var iAd = null;
  81.         cpmstarAPI(function(api) {        
  82.             iAd = new api.game.InterstitialView("interstitial");
  83.             iAd.load();
  84.             iAd.addEventListener("ad_opened", function(e) {                
  85.                  iAdPause();
  86.             });
  87.             iAd.addEventListener("ad_closed", function(e) {                
  88.                 var adstuff=setTimeout(function() {iAdUnpause();},700);
  89.                 iAd.load();
  90.             });
  91.         });
  92.  
  93.        
  94.        
  95.         function displayInterstitial() {        
  96.             if(iAd && iAd.isLoaded())
  97.             {
  98.                 iAd.show();
  99.                 console.log('show')
  100.             }
  101.             else if(iAd)
  102.             {
  103.                 iAd.load();
  104.                 console.log('load')
  105.             }
  106.         }
  107.  
  108.         function iAdPause() {
  109.         console.log("Reward ad started playing")  
  110.         }
  111.         function iAdUnpause() {
  112.             clearTimeout(adstuff);
  113.             console.log("Reward ad finished playing")
  114.         }
  115.  
  116. #END JAVASCRIPT
  117.  
  118. Client
  119.     onConnect()
  120.         JS.adblock()
  121.     //  this.AdblockDetect(JS.adblocking);
  122.     onNew()
  123.         client = this
  124.     function AdblockDetect(x)
  125.         if(x==1)
  126.             World.log("The user is adblocking ADBLOCKDETECT");
  127.             this.sendPacket('d')
  128.         if(x==0)
  129.             World.log("The user is not adblocking ADBLOCKDETECT");
  130.         //  this.sendPacket('a')
  131.         //  this.disableOptions()
  132.        
  133. #END CLIENTCODE
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top