Advertisement
arabtion

Untitled

Mar 25th, 2023
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1.  
  2. $('.popen').hide();
  3. $('.pclose').show();
  4. var modal = document.getElementById('small_modal');
  5. var largeModal = document.getElementById('large_modal');
  6. function checkAds() {
  7. var ads = document.querySelectorAll('.adsbygoogle');
  8. var emptyAds = false;
  9. for (var i = 0; i < ads.length; i++) {
  10. if(ads[i].getAttribute('data-ad-status') === 'unfilled'){
  11. ads[i].removeAttribute('data-adsbygoogle-status');
  12. ads[i].removeAttribute('data-ad-status');
  13. ads[i].removeAttribute('data-ad-slot');
  14. ads[i].removeAttribute('data-ad-client');
  15. ads[i].innerHTML = '';
  16. (adsbygoogle = window.adsbygoogle || []).push({});
  17. console.log('Ad regenerated!');
  18. }
  19. }
  20. }
  21. setInterval(checkAds, 3000);
  22. function regenerateAds() {
  23. var ads = document.querySelectorAll('.adsbygoogle');
  24. for (var i = 0; i < ads.length; i++) {
  25. ads[i].removeAttribute('data-adsbygoogle-status');
  26. ads[i].removeAttribute('data-ad-status');
  27. ads[i].removeAttribute('data-ad-slot');
  28. ads[i].removeAttribute('data-ad-client');
  29. ads[i].innerHTML = '';
  30. (adsbygoogle = window.adsbygoogle || []).push({});
  31. console.log('Ad regenerated!');
  32. }
  33. }
  34. setInterval(regenerateAds, 120000);
  35. function showCustomPopup() {
  36. var customPopup = document.getElementById('custom-popup');
  37. customPopup.style.display = 'flex';
  38. customPopup.style.zIndex = '999';
  39. var blurElement = document.createElement('div');
  40. blurElement.setAttribute('id', 'blur');
  41. blurElement.style.position = 'fixed';
  42. blurElement.style.top = '0';
  43. blurElement.style.left = '0';
  44. blurElement.style.width = '100%';
  45. blurElement.style.height = '100%';
  46. blurElement.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
  47. blurElement.style.zIndex = '998';
  48. blurElement.style.backdropFilter = 'blur(5px)';
  49. document.body.appendChild(blurElement);
  50. }
  51. function hideCustomPopup() {
  52. var customPopup = document.getElementById('custom-popup');
  53. customPopup.style.display = 'none';
  54. customPopup.style.zIndex = '0';
  55.  
  56. var blurElement = document.getElementById('blur');
  57. blurElement.parentNode.removeChild(blurElement);
  58. }
  59. function adBlockDetected() {
  60. showCustomPopup();
  61. }
  62. if (typeof blockAdBlock === 'undefined') {
  63. adBlockDetected();
  64. }
  65. setTimeout(function() {
  66. document.getElementById('my-vignette-ad').style.visibility = 'visible';
  67. }, 300000);
  68. });
  69. function hideVignetteAd() {
  70. document.getElementById('my-vignette-ad').style.visibility = 'hidden';
  71. setTimeout(function() {
  72. document.getElementById('my-vignette-ad').style.visibility = 'visible';
  73. }, 600000);
  74. }
  75. hideTopAd = function() {
  76. $('#top_ad_close').slideUp(100);
  77. $('#special_space').slideUp(100);
  78. setTimeout(function() {
  79. $('#special_space').slideDown(100);
  80. setTimeout(function() {
  81. $('#top_ad_close').slideDown(100);
  82. }, 2500);
  83. }, 90000);
  84. event.stopPropagation();
  85. }
  86. hidePrvTopAd = function() {
  87. $('#prvtop_ad_close').hide();
  88. $('#prv_special_space').slideUp(100);
  89. setTimeout(function() {
  90. $('#prv_special_space').slideDown(100);
  91. setTimeout(function() {
  92. $('#prvtop_ad_close').show();
  93. }, 2500);
  94. }, 90000);
  95. event.stopPropagation();
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement