Javgg auto click

javgg.net auto click when ad page to download

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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);
    })
})();