forked from floflo3299/LSS-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDailyButtonBlink.user.js
37 lines (30 loc) · 1.53 KB
/
DailyButtonBlink.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
// ==UserScript==
// @name DailyButtonBlink
// @namespace http://tampermonkey.net/
// @version 1
// @description Let the daily button blink
// @author Silberfighter
// @match https://www.leitstellenspiel.de/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=leitstellenspiel.de
// @grant none
// @namespace https://https://github.com/floflo3299/LSS-Scripts/edit/main/DailyButtonBlink.user.js
// ==/UserScript==
(function() {
'use strict';
// BESCHREIBUNG:
// während Events (z.B. Advent) wird der "täglicher Login"-Knopf durch ein Dropdown-Menu ersetzt.
// Da das Vergessen des Einsammels besondern ärgerlich ist, lässt dieses Skript den Knopf blinken und öffnet das Drop-Down Menu beim erstmaligen Laden der Webseite automatisch
//------- you can change this variables -------
var blink_speed = 850; //blinkingspeed. 1000 is equals to 1 second
//------- after here change only stuff if you know what you are doing -------
if(document.getElementById("menu_daily_rewards")){
document.getElementById("menu_daily_rewards").click();
var t = setInterval(function () {
if(document.getElementById("daily-bonus").parentElement.getAttribute("style")){
document.getElementById("daily-bonus").parentElement.setAttribute("style","");
} else {
document.getElementById("daily-bonus").parentElement.setAttribute("style","background-color:green;");
}
}, blink_speed);
}
})();