Javgg auto click

javgg.net auto click when ad page to download

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Javgg auto click
// @namespace    http://tampermonkey.net/
// @version      0.0.4
// @description  javgg.net auto click when ad page to download
// @match        https://javgg.net/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=javgg.net
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // auto click to skip adds
    const clickButton = () => {
        const button =
              document.querySelector("#AD_160")
        if (button) button.click()
        else setTimeout(clickButton, 500)
        console.log(button)
    }
    window.addEventListener("DOMcontentloaded", clickButton())
    //replace blockec button by normal download button
    const nodes = [...document.querySelectorAll(".btndll")];
    nodes.forEach(node=>{
        var link = document.createElement('a');
        link.id = 'link1';
        link.href =node.href;
        link.innerHTML = node.innerHTML
        node.parentNode.insertBefore(link, node);
        node.parentNode.removeChild(node);
    })
})();