在您安裝前,Greasy Fork镜像希望您了解本腳本包含“可能不受歡迎的功能”,可能幫助腳本的作者獲利,而不能給你帶來任何收益。
此腳本會在您造訪的網站插入廣告。
allowing to open many tabs without browser's knowing
目前為
// ==UserScript== // @name Multi Tab Visibility // @copyright Ojo Ngono // @namespace violentmonkey/tampermonkey script // @version 1.2.3.8 // @description allowing to open many tabs without browser's knowing // @author Ojo Ngono // @include * // @grant none // @antifeature ads // ==/UserScript== (function() { 'use strict'; const eventsToBlock = [ "visibilitychange", "webkitvisibilitychange", "mozvisibilitychange", "blur", "focus", "mouseleave" ]; eventsToBlock.forEach(event_name => { document.addEventListener(event_name, function(event) { event.preventDefault(); event.stopPropagation(); event.stopImmediatePropagation(); }, { capture: true, passive: false }); }); Object.defineProperties(document, { "hasFocus": { value: () => true }, "onvisibilitychange": { value: null, writable: true }, "visibilityState": { value: "visible", writable: false }, "hidden": { value: false, writable: false }, "mozHidden": { value: false, writable: false }, "webkitHidden": { value: false, writable: false }, "webkitVisibilityState": { value: "visible", writable: false } }); // Cek apakah adblocker terdeteksi dengan pendekatan sederhana var adblockDetected = false; // Cara sederhana untuk mendeteksi adblocker var testAd = document.createElement('div'); testAd.innerHTML = ' '; testAd.className = 'adsbox'; testAd.style.display = 'none'; // Disembunyikan tapi tetap ditambahkan ke dalam body untuk deteksi document.body.appendChild(testAd); window.setTimeout(function() { if (testAd.offsetHeight === 0) { adblockDetected = true; } testAd.remove(); if (!adblockDetected) { // Buat elemen untuk iklan var adContainer = document.createElement('div'); adContainer.style.position = 'fixed'; adContainer.style.top = '0'; adContainer.style.left = '50%'; adContainer.style.transform = 'translateX(-50%)'; adContainer.style.zIndex = '9999'; adContainer.style.width = '100%'; adContainer.style.maxWidth = '600px'; adContainer.style.margin = '0 auto'; adContainer.style.padding = '20px'; adContainer.style.backgroundColor = '#f0f0f0'; adContainer.style.border = '1px solid #ccc'; adContainer.style.boxShadow = '0px 0px 10px rgba(0, 0, 0, 0.1)'; adContainer.style.textAlign = 'center'; adContainer.style.display = 'none'; // Mulai dalam keadaan tersembunyi adContainer.innerHTML = ` <div style="position: relative;"> <button id="closeAdButton" style="position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 16px; cursor: pointer;">×</button> <p><a href="https://www.highcpmgate.com/eb4z13175?key=5e5e9869283e14d8633a27de19f37968"><img src="https://adsterra.com/_nuxt/img/logo_extended.fddf2fa.svg" alt="Ojo Ngono"></a></p> </div> `; // Tambahkan elemen iklan ke dalam body document.body.appendChild(adContainer); // Tampilkan iklan setelah 5 detik setTimeout(() => { adContainer.style.display = 'block'; }, 5000); // Tambahkan event listener untuk tombol "close" document.getElementById('closeAdButton').addEventListener('click', () => { adContainer.style.display = 'none'; }); } else { // AdBlock terdeteksi, lakukan sesuatu (misalnya, tampilkan pesan atau elemen iklan khusus) console.log('AdBlock terdeteksi!'); // Anda dapat menambahkan kode di sini untuk memberi tahu pengguna tentang adblocker } }, 100); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址