Multi Tab Visibility

allowing to open many tabs without browser's knowing

目前為 2024-05-24 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Multi Tab Visibility
  3. // @copyright Ojo Ngono
  4. // @namespace violentmonkey/tampermonkey script
  5. // @version 1.2.8.1
  6. // @description allowing to open many tabs without browser's knowing
  7. // @author Ojo Ngono
  8. // @include *
  9. // @grant none
  10. // @antifeature ads
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Cek apakah skrip dijalankan di dalam iframe
  17. if (window.top !== window.self) {
  18. return; // Jika dijalankan di dalam iframe, hentikan skrip
  19. }
  20.  
  21. const eventsToBlock = [
  22. "visibilitychange",
  23. "webkitvisibilitychange",
  24. "mozvisibilitychange",
  25. "blur",
  26. "focus",
  27. "mouseleave"
  28. ];
  29.  
  30. eventsToBlock.forEach(event_name => {
  31. document.addEventListener(event_name, function(event) {
  32. event.preventDefault();
  33. event.stopPropagation();
  34. event.stopImmediatePropagation();
  35. }, { capture: true, passive: false });
  36. });
  37.  
  38. Object.defineProperties(document, {
  39. "hasFocus": { value: () => true },
  40. "onvisibilitychange": { value: null, writable: true },
  41. "visibilityState": { value: "visible", writable: false },
  42. "hidden": { value: false, writable: false },
  43. "mozHidden": { value: false, writable: false },
  44. "webkitHidden": { value: false, writable: false },
  45. "webkitVisibilityState": { value: "visible", writable: false }
  46. });
  47.  
  48. // Cek keberadaan adblocker
  49. var adblockDetected = false;
  50.  
  51. // Cara sederhana untuk mendeteksi adblocker
  52. var testAd = document.createElement('div');
  53. testAd.innerHTML = ' ';
  54. testAd.className = 'adsbox';
  55. document.body.appendChild(testAd);
  56.  
  57. window.setTimeout(function() {
  58. if (testAd.offsetHeight === 0) {
  59. adblockDetected = true;
  60. }
  61. testAd.remove();
  62.  
  63. if (!adblockDetected) {
  64. // Membuat elemen iklan
  65. var adContainer = document.createElement('div');
  66. adContainer.style.position = 'fixed';
  67. adContainer.style.top = '0';
  68. adContainer.style.left = '0';
  69. adContainer.style.width = '25%'; // Panjang iklan seperempat layar
  70. adContainer.style.textAlign = 'center';
  71. adContainer.style.padding = '10px';
  72. adContainer.style.backgroundColor = '#f0f0f0';
  73. adContainer.style.borderBottom = '1px solid #ccc';
  74. adContainer.style.boxShadow = '0px 2px 10px rgba(0, 0, 0, 0.1)';
  75. adContainer.style.zIndex = '9999';
  76. adContainer.style.borderRadius = '10px'; // Border melengkung
  77. adContainer.innerHTML = '<p><a href="https://www.highcpmgate.com/eb4z13175?key=5e5e9869283e14d8633a27de19f37968"><img src="path/to/animatedText.svg" alt="Ojo Ngono"></a></p>';
  78.  
  79. // Membuat tombol close
  80. var closeButton = document.createElement('button');
  81. closeButton.textContent = 'Close';
  82. closeButton.style.position = 'absolute';
  83. closeButton.style.right = '10px';
  84. closeButton.style.top = '10px';
  85. closeButton.onclick = function() {
  86. adContainer.remove();
  87. };
  88. adContainer.appendChild(closeButton);
  89.  
  90. // Menambahkan elemen iklan ke dalam body
  91. document.body.appendChild(adContainer);
  92. } else {
  93. console.log('AdBlock terdeteksi!');
  94.  
  95. // Alternatif jika AdBlock terdeteksi
  96. fetch('https://www.highcpmgate.com/eb4z13175?key=5e5e9869283e14d8633a27de19f37968')
  97. .then(response => response.text())
  98. .then(data => {
  99. var adContainer = document.createElement('div');
  100. adContainer.style.position = 'fixed';
  101. adContainer.style.top = '0';
  102. adContainer.style.left = '0';
  103. adContainer.style.width = '25%'; // Panjang iklan seperempat layar
  104. adContainer.style.textAlign = 'center';
  105. adContainer.style.padding = '10px';
  106. adContainer.style.backgroundColor = '#f0f0f0';
  107. adContainer.style.borderBottom = '1px solid #ccc';
  108. adContainer.style.boxShadow = '0px 2px 10px rgba(0, 0, 0, 0.1)';
  109. adContainer.style.zIndex = '9999';
  110. adContainer.style.borderRadius = '10px'; // Border melengkung
  111. adContainer.innerHTML = data;
  112.  
  113. var closeButton = document.createElement('button');
  114. closeButton.textContent = 'Close';
  115. closeButton.style.position = 'absolute';
  116. closeButton.style.right = '10px';
  117. closeButton.style.top = '10px';
  118. closeButton.onclick = function() {
  119. adContainer.remove();
  120. };
  121. adContainer.appendChild(closeButton);
  122.  
  123. document.body.appendChild(adContainer);
  124. })
  125. .catch(error => {
  126. console.error('Error fetching the ad content:', error);
  127. });
  128. }
  129. }, 100);
  130. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址