AUTOCLICK "Continue" OF "Please disable your ad-block." or Ads Support Popup

X:

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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    AUTOCLICK "Continue" OF "Please disable your ad-block." or Ads Support Popup
// @namespace    
// @version 2024-10-24
// @description X:
// @author  Beginner[2023]
// @match   https://idol.sankakucomplex.com/*
// @match   https://chan.sankakucomplex.com/*
// @icon    https://www.google.com/s2/favicons?sz=64&domain=sankakucomplex.com
// @grant   none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    var a = document.getElementById('content');
    var adpop_main = null;

    function check_adpop_vis() {
        if (adpop_main != null && adpop_main.getStyle('display') == 'none') {
            return false
        } else if (adpop_main == null) {
            for (let i = 0; i < a.children.length; i++) {
                /* checking the next element have to continue */
                if(a.children[i].nextElementSibling == null) {
                    // console.log('no more next element')
                    break
                }
                if(a.children[i].nextElementSibling.tagName.toLowerCase() == 'script' && a.children[i].nextElementSibling.getAttribute('type') == null){
                    adpop_main = a.children[i];
                    // console.log('pop!!')
                    return true
                }
            }
        }
    }

    function autoclick_c() {
        if(adpop_main != null) {
            try {
                let name_func = adpop_main.lastElementChild.childNodes[0].textContent.trim().slice('async function '.length,'async function '.length+7);
                window[name_func]()
            } catch (error) {
                console.log(error)
            }
        }
    }


    let running = setInterval(function() {
        let sta = check_adpop_vis()
        if (sta == true) {
            // console.log(sta)
            autoclick_c();
        } else {
            // console.log(sta)
            clearInterval(running);
        }
    },300)


})();