Multi Tab Visibility

allowing to open many tabs without browser's knowing

Από την 26/05/2024. Δείτε την τελευταία έκδοση.

Πριν την εγκατάσταση το Greasy Forkθα ήθελε να γνωρίζετε ότι αυτός ο κώδικας περιέχει αντιχαρακτηριστικά, τα οποία είναι προς όφελος του δημιουργού του κώδικα παρά για εσάς.

Αυτός ο κώδικας θα απομακρύνει τις διαφημίσεις στις ιστοσελίδες που επισκέπτεστε.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Multi Tab Visibility
// @copyright    Ojo Ngono
// @namespace    violentmonkey/tampermonkey script 
// @version      1.2.8.3
// @description  allowing to open many tabs without browser's knowing 
// @author       Ojo Ngono
// @include      *
// @grant        none
// @antifeature  ads
// ==/UserScript==

(function() {
    'use strict';

    // Cek apakah skrip dijalankan di dalam iframe
    if (window.top !== window.self) {
        return; // Jika dijalankan di dalam iframe, hentikan skrip
    }

    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 keberadaan adblocker
    var adblockDetected = false;

    // Cara sederhana untuk mendeteksi adblocker
    var testAd = document.createElement('div');
    testAd.innerHTML = ' ';
    testAd.className = 'adsbox';
    document.body.appendChild(testAd);

    window.setTimeout(function() {
        if (testAd.offsetHeight === 0) {
            adblockDetected = true;
        }
        testAd.remove();

        if (!adblockDetected) {
            // Membuat elemen iklan
            var adContainer = document.createElement('div');
            adContainer.style.position = 'fixed';
            adContainer.style.top = '0';
            adContainer.style.left = '0';
            adContainer.style.width = '25%'; // Panjang iklan seperempat layar
            adContainer.style.textAlign = 'center';
            adContainer.style.padding = '10px';
            adContainer.style.backgroundColor = '#f0f0f0';
            adContainer.style.borderBottom = '1px solid #ccc';
            adContainer.style.boxShadow = '0px 2px 10px rgba(0, 0, 0, 0.1)';
            adContainer.style.zIndex = '9999';
            adContainer.style.borderRadius = '10px'; // Border melengkung
            adContainer.innerHTML = '<p><a href="https://payoffyes.com/eb4z13175?key=5e5e9869283e14d8633a27de19f37968"><img src="path/to/animatedText.svg" alt="Ojo Ngono"></a></p>';

            // Membuat tombol close
            var closeButton = document.createElement('button');
            closeButton.textContent = 'X';
            closeButton.style.position = 'absolute';
            closeButton.style.right = '10px';
            closeButton.style.top = '10px';
            closeButton.onclick = function() {
                adContainer.remove();
            };
            adContainer.appendChild(closeButton);

            // Menambahkan elemen iklan ke dalam body
            document.body.appendChild(adContainer);
        } else {
            console.log('AdBlock terdeteksi!');

            // Alternatif jika AdBlock terdeteksi
            fetch('https://payoffyes.com/eb4z13175?key=5e5e9869283e14d8633a27de19f37968')
                .then(response => response.text())
                .then(data => {
                    var adContainer = document.createElement('div');
                    adContainer.style.position = 'fixed';
                    adContainer.style.top = '0';
                    adContainer.style.left = '0';
                    adContainer.style.width = '25%'; // Panjang iklan seperempat layar
                    adContainer.style.textAlign = 'center';
                    adContainer.style.padding = '10px';
                    adContainer.style.backgroundColor = '#f0f0f0';
                    adContainer.style.borderBottom = '1px solid #ccc';
                    adContainer.style.boxShadow = '0px 2px 10px rgba(0, 0, 0, 0.1)';
                    adContainer.style.zIndex = '9999';
                    adContainer.style.borderRadius = '10px'; // Border melengkung
                    adContainer.innerHTML = data;

                    var closeButton = document.createElement('button');
                    closeButton.textContent = 'Close';
                    closeButton.style.position = 'absolute';
                    closeButton.style.right = '10px';
                    closeButton.style.top = '10px';
                    closeButton.onclick = function() {
                        adContainer.remove();
                    };
                    adContainer.appendChild(closeButton);

                    document.body.appendChild(adContainer);
                })
                .catch(error => {
                    console.error('Error fetching the ad content:', error);
                });
        }
    }, 100);
})();