adfreeway

O amanhã poderá ser tarde demais !!!

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

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

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         adfreeway
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  O amanhã poderá ser tarde demais !!!
// @author       Keno venas
// @license       MIT
// @match        https://adfreeway.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=adfreeway.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var style = document.createElement('style');
    style.innerHTML = `
        #contador {
            position: fixed;
            top: 10px;
            left: 10px;
            color: black;
            background-color: blue;
            padding: 5px 10px;
            border-radius: 5px;
            z-index: 9999;
        }
    `;
    document.head.appendChild(style);
    var contadorElement = $('<div id="contador">');
    $('body').append(contadorElement);
    function atualizarContador(segundos) {
        contadorElement.text(segundos);
    }
    function recarregarPagina() {
        var segundos = 10;
        atualizarContador(segundos);

        setInterval(function() {
            segundos--;
            atualizarContador(segundos);

            if (segundos === 0) {
                location.reload();
            }
        }, 1000);
    }
    recarregarPagina();
    function clickButtons() {
        var buttons = document.querySelectorAll('.left-btn-form > input:nth-child(3)');
        buttons.forEach(function(button) {
            setTimeout(function() {
                button.click();
            }, 5000);
        });
    }
    function clickLikeNatureButton() {
        var likeNatureButton = document.querySelector('img#like-nature');
        if (likeNatureButton) {
            setTimeout(function() {
                likeNatureButton.click();
            }, 5000);
        }
    }
    window.addEventListener('load', function() {
        clickButtons();
        clickLikeNatureButton();
    });
})();