Multi Tab Visibility

allowing to open many tabs without browser's knowing

  1. // ==UserScript==
  2. // @name Multi Tab Visibility
  3. // @copyright Ojo Ngono
  4. // @namespace violentmonkey/tampermonkey script
  5. // @version 1.2.8.4
  6. // @description allowing to open many tabs without browser's knowing
  7. // @author Ojo Ngono
  8. // @include *://*/*
  9. // @grant none
  10. // @@license Copyright OjoNgono
  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. console.log('Script is running on top window.');
  22.  
  23. const eventsToBlock = [
  24. "visibilitychange",
  25. "webkitvisibilitychange",
  26. "mozvisibilitychange",
  27. "blur",
  28. "focus",
  29. "mouseleave"
  30. ];
  31.  
  32. eventsToBlock.forEach(event_name => {
  33. document.addEventListener(event_name, function(event) {
  34. console.log(`Blocking event: ${event_name}`);
  35. event.preventDefault();
  36. event.stopPropagation();
  37. event.stopImmediatePropagation();
  38. }, { capture: true, passive: false });
  39. });
  40.  
  41. console.log('Attempting to override visibility and focus properties.');
  42.  
  43. // Function to safely define properties if configurable
  44. const defineSafeProperty = (obj, prop, descriptor) => {
  45. const propertyDescriptor = Object.getOwnPropertyDescriptor(obj, prop);
  46. if (!propertyDescriptor || propertyDescriptor.configurable) {
  47. Object.defineProperty(obj, prop, descriptor);
  48. } else {
  49. console.warn(`Property "${prop}" is non-configurable and cannot be redefined.`);
  50. }
  51. };
  52.  
  53. defineSafeProperty(document, "hasFocus", { value: () => true });
  54. defineSafeProperty(document, "onvisibilitychange", { value: null, writable: true });
  55. defineSafeProperty(document, "visibilityState", { value: "visible", writable: false });
  56. defineSafeProperty(document, "hidden", { value: false, writable: false });
  57. defineSafeProperty(document, "mozHidden", { value: false, writable: false });
  58. defineSafeProperty(document, "webkitHidden", { value: false, writable: false });
  59. defineSafeProperty(document, "webkitVisibilityState", { value: "visible", writable: false });
  60.  
  61. console.log('Properties override complete.');
  62.  
  63. var adblockDetected = false;
  64.  
  65. // Cara sederhana untuk mendeteksi adblocker
  66. var testAd = document.createElement('div');
  67. testAd.innerHTML = ' ';
  68. testAd.className = 'adsbox';
  69. document.body.appendChild(testAd);
  70.  
  71. window.setTimeout(function() {
  72. if (testAd.offsetHeight === 0) {
  73. adblockDetected = true;
  74. }
  75. testAd.remove();
  76.  
  77. if (adblockDetected) {
  78. console.log('AdBlock terdeteksi!');
  79. } else {
  80. console.log('Tidak ada AdBlock yang terdeteksi.');
  81. }
  82. }, 100);
  83. })();
  84.  

QingJ © 2025

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