Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Alkatria komunikaty off
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://alkatria.pl/game
- // @icon https://www.google.com/s2/favicons?sz=64&domain=alkatria.pl
- // @grant none
- // ==/UserScript==
- //<div class="small-info-alert vmWoDq-nFAzwF-NqePtr-DxAhVp-Lwibhp-zLegUN small-alert-undefined">Musisz wybrać przeciwnika!</div>
- (function() {
- console.log("Funkcja Komunikaty Off");
- 'use strict';
- //Definicja funkcji
- function Komunikaty(){
- setTimeout(() => { //żeby dobrze pobrał element
- let buttonSearch = document.getElementsByClassName('logout-button').item(0);
- const LookFor = "Tekst"; // Change this to find a different string
- const content = document.body.textContent || document.body.innerText;
- const hasText = content.indexOf(LookFor) !== -1;
- if(!hasText) { //jeżeli znalazło szczepionki
- //Uniaty
- setTimeout(() => {
- let Komunikat1 = document.getElementsByClassName('small-info-alert').item(0);
- // console.log('Komunikat1');
- Komunikat1.click();
- }, 0)
- //Hera
- setTimeout(() => {
- let Komunikat2 = document.getElementsByClassName('small-info-alert').item(0);
- //console.log('Epik1');
- Komunikat2.click();
- }, 0)
- } else { //jeżeli nie znalazło szczepionki
- // buttonSearch.click();
- buttonSearch.click();
- }
- }, 0);
- }
- //Uruchamianie skryptu w pętli
- setTimeout(() => {const timerVar = setInterval (function() {Komunikaty(); }, 101);}, 5000)
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement