Advertisement
Guest User

Rangerboard Adblock Detection

a guest
Aug 11th, 2024
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function()
  2.     {
  3.     window.addEventListener('load',function()
  4.         {
  5.         let Iwueayk=!0;
  6.         let JfkbXsUlK=!1;
  7.         let TZlkXOtWb=!1;
  8.         let AvFDRjsqDlVyKih="dps";
  9.         let VVTteABK=[userid];
  10.         let JDETXLItnIRJEP=!1;
  11.         let qGJjQTOw=0;
  12.         const FNSLgxbQdkVQi=3;
  13.         function GkzfDQcwFSFH()
  14.             {
  15.             return new Promise((resolve,reject)=>
  16.                 {
  17.                 function ouRFCfjqzASUqb(method)
  18.                     {
  19.                     JDETXLItnIRJEP=!0;
  20.                     resolve()
  21.                 }
  22.                 function HFokXWwKSwSzSKH(method)
  23.                     {
  24.                     qGJjQTOw++;
  25.                     if(qGJjQTOw===FNSLgxbQdkVQi&&!JDETXLItnIRJEP)
  26.                         {
  27.                         reject()
  28.                     }
  29.                 }
  30.                 let checks=[];
  31.                 if(Iwueayk)
  32.                     {
  33.                     checks.push(new Promise((resolveMethod,rejectMethod)=>
  34.                         {
  35.                         const kDvJlkYrm=document.createElement('div');
  36.                         kDvJlkYrm.className='pub_300x250 pub_300x250m text-ad textAd text_ad adBanner ad-banner ad_box adbox';
  37.                         kDvJlkYrm.style='width: 1px;
  38.                          height: 1px;
  39.                          position: absolute;
  40.                          left: -10000px;
  41.                          top: -1000px;
  42.                         ';
  43.                         document.body.appendChild(kDvJlkYrm);
  44.                         setTimeout(function()
  45.                             {
  46.                             if(kDvJlkYrm.offsetHeight===0)
  47.                                 {
  48.                                 ouRFCfjqzASUqb('1');
  49.                                 resolveMethod()
  50.                             }
  51.                             else
  52.                                 {
  53.                                 HFokXWwKSwSzSKH('1');
  54.                                 rejectMethod()
  55.                             }
  56.                             document.body.removeChild(kDvJlkYrm)
  57.                         }
  58.                         ,100)
  59.                     }
  60.                     ))
  61.                 }
  62.                 if(JfkbXsUlK)
  63.                     {
  64.                     checks.push(new Promise((resolveMethod,rejectMethod)=>
  65.                         {
  66.                         if(!document.querySelector('script[src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"]'))
  67.                             {
  68.                             const script=document.createElement('script');
  69.                             script.async=!0;
  70.                             script.type='text/javascript';
  71.                             script.src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
  72.                             script.onerror=function()
  73.                                 {
  74.                                 ouRFCfjqzASUqb('2');
  75.                                 resolveMethod()
  76.                             };
  77.                             script.onload=function()
  78.                                 {
  79.                                 HFokXWwKSwSzSKH('2');
  80.                                 rejectMethod()
  81.                             };
  82.                             document.body.appendChild(script)
  83.                         }
  84.                         else
  85.                             {
  86.                             HFokXWwKSwSzSKH('2');
  87.                             rejectMethod()
  88.                         }
  89.                     }
  90.                     ))
  91.                 }
  92.                 if(TZlkXOtWb)
  93.                     {
  94.                     checks.push(new Promise((resolveMethod,rejectMethod)=>
  95.                         {
  96.                         const xhr=new XMLHttpRequest();
  97.                         xhr.open('GET','https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',!0);
  98.                         xhr.onreadystatechange=function()
  99.                             {
  100.                             if(xhr.readyState===4)
  101.                                 {
  102.                                 if(xhr.status===0||xhr.responseText.toLowerCase().indexOf("ublock")>-1||xhr.responseText.toLowerCase().indexOf("height:1px")>-1)
  103.                                     {
  104.                                     ouRFCfjqzASUqb('3');
  105.                                     resolveMethod()
  106.                                 }
  107.                                 else
  108.                                     {
  109.                                     HFokXWwKSwSzSKH('3');
  110.                                     rejectMethod()
  111.                                 }
  112.                                 qGJjQTOw++;
  113.                                 if(qGJjQTOw===FNSLgxbQdkVQi&&!JDETXLItnIRJEP)
  114.                                     {
  115.                                     reject()
  116.                                 }
  117.                             }
  118.                         };
  119.                         xhr.send()
  120.                     }
  121.                     ))
  122.                 }
  123.                 Promise.allSettled(checks).then(()=>
  124.                     {
  125.                     if(!JDETXLItnIRJEP)
  126.                         {
  127.                         XF.ajax("POST",XF.canonicalizeUrl("index.php?dps/[userid]/0"),
  128.                             {
  129.                             user_id:[userid]
  130.                         }
  131.                         );
  132.                         reject()
  133.                     }
  134.                     else
  135.                         {
  136.                         XF.ajax("POST",XF.canonicalizeUrl("index.php?dps/[userid]/1"),
  137.                             {
  138.                             user_id:[userid]
  139.                         }
  140.                         );
  141.                         resolve()
  142.                     }
  143.                 }
  144.                 )
  145.             }
  146.             )
  147.         }
  148.         GkzfDQcwFSFH().then(()=>
  149.             {
  150.         }
  151.         ).catch(()=>
  152.             {
  153.         }
  154.         )
  155.     }
  156.     )
  157. }
  158. )()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement