Untitled

 avatar
unknown
javascript
2 years ago
1.6 kB
4
Indexable
// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      2023-12-13
// @description  try to take over the world!
// @author       You
// @match        https://*.wolnifarmerzy.pl/*
// @match        http://*.wolnifarmerzy.pl/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant        none
// ==/UserScript==

let txt = `


function seeding(){
var field = prompt("Podaj numer pola(od 1 do 6)");
specialZoneFieldHandler(field);
cropGarden(field)
setTimeout(function(){
hideDiv('globalbox');
  hideDiv('globaltransp');
  $('globalbox_content').innerHTML = '';

}, 700);



if (!selected) {
	alert("wybierz nasiono");
    return;
}

var x = 1
var interval = setInterval(() => {
	if (x === 121) {
clearInterval(interval);
console.log("koniec");
	}

var f = document.getElementById("f"+x)
f.click();
x = x + 1
}, 400 + Math.floor( Math.random() * 100 + 1));


}
`;

//var field = null
(function() {
    'use strict';
    let main_body = document.getElementById("main_body");
    if (main_body) {
        console.log("Jesteś na stronie, dodajemy skrypt");
        let new_script = document.createElement("script");
        new_script.innerHTML = txt;
        document.body.appendChild(new_script);

        var new_icon = document.createElement("div")
        new_icon.textContent = "test";
        new_icon.style.background = "gray";
        new_icon.addEventListener("click", seeding);
        new_icon.id = "new_icon";
        //new_icon.style.onClick = "seeding";
        document.getElementById("uptoolbar").appendChild(new_icon)
    }
})();

Editor is loading...
Leave a Comment