Skip to content

Commit

Permalink
added js file
Browse files Browse the repository at this point in the history
  • Loading branch information
boglarkla authored Nov 19, 2021
1 parent a903397 commit 3729e44
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions ebneveldescript.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// ==UserScript==
// @name EbneveldeScript
// @namespace http://tampermonkey.net/
// @version 1.0
// @downloadURL https://gist.github.com/boglarkla/c9557fde77a02b504b460bc89e2345b9
// @description Segít automatikusan ellátni a kutyákat ebneveldén, mivel baromi uncsi végig kattintgatni mindent. :)
// @author boglarkla
// @match *://www.ebnevelde.hu/dogs/zoom/?id=*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==

(

function AutoClicker() {
'use strict';
let url = window.location.href;

if(!url.includes("&")){

if(document.body.innerHTML.search("10 napra elég") == -1)
{
document.getElementsByClassName("big_button")[1].click();
}

var button = document.getElementsByClassName("big_disabled")[0];
if(button === undefined){
document.getElementsByClassName("big_button")[2].click();
}
else{
// check if the 0th disabled button is for teaching
if(button.innerHTML != "Tanítás"){
document.getElementsByClassName("big_button")[2].click();
}

button = document.getElementsByClassName("big_disabled")[1];
if(button === undefined){
document.getElementsByClassName("big_button")[3].click();
}
else{
// check if the 1st disabled button is for playing
if(button.innerHTML != "Játék"){
document.getElementsByClassName("big_button")[3].click();
}

button = document.getElementsByClassName("big_disabled")[2];
if(button === undefined){
document.getElementsByClassName("big_button")[4].click();
}
else{
// check if the 2nd disabled button is for walking
if(button.innerHTML != "Séta"){
document.getElementsByClassName("big_button")[4].click();
}

button = document.getElementsByClassName("big_disabled")[3];
if(button === undefined){
document.getElementsByClassName("big_button")[5].click();
}
else{
// check if the 3rd disabled button is for bath
if(button.innerHTML != "Fürdetés"){
document.getElementsByClassName("big_button")[5].click();
}
document.getElementsByClassName("big_button")[6].click();
}
}
}
}
}

if(url.includes("&etel")){
document.getElementsByClassName("button")[0].click();
}

if(url.includes("&tanit")){
document.getElementsByClassName("button")[0].click();
}

if(url.includes("&jatek")){
document.getElementsByClassName("button")[0].click();
}

if(url.includes("&furdet")){
document.getElementsByClassName("button")[0].click();
}
}
)();

0 comments on commit 3729e44

Please sign in to comment.