-
Notifications
You must be signed in to change notification settings - Fork 0
/
ebneveldescript.user.js
115 lines (102 loc) · 3.99 KB
/
ebneveldescript.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// ==UserScript==
// @name EbneveldeScript
// @namespace http://tampermonkey.net/
// @version 1.4.1
// @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;
// we are on the main page
if(!url.includes("&")){
// if food is not full
if(document.body.innerHTML.search("10 napra elég") == -1)
{
// click on feed button
document.getElementsByClassName("big_button")[1].click();
}
// load the 0th disabled button's text
var button = document.getElementsByClassName("big_disabled")[0];
// if said button does not exist
if(button === undefined){
// click on teach button
document.getElementsByClassName("big_button")[2].click();
}
// there is indeed a disabled button
else{
var i = 0;
if(button.innerHTML == "Előző"){
i = 1;
}
// 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+i];
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+i];
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+i];
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();
}
else{
document.getElementsByClassName("big_button")[6].click();
}
}
}
}
document.getElementsByClassName("big_button")[5].click();
}
}
else if(url.includes("&etel")){
document.getElementsByClassName("button")[0].click();
}
else if(url.includes("&tanit")){
document.getElementsByClassName("button")[0].click();
}
else if(url.includes("&jatek")){
document.getElementsByClassName("button")[0].click();
}
else if(url.includes("&furdet")){
document.getElementsByClassName("button")[0].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();
}
*/
}
)();