Skip to content

Commit 9707054

Browse files
committed
Update selectors to match the new twitch layout
1 parent 7d5d235 commit 9707054

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/contentScripts/worker.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// 14 minutes 58 seconds in ms
2-
const ALMOST_FIFTEEN_MINUTES_MS = 15 * 60 * 1000 - 2000;
3-
const FIVE_SECONDS = 5 * 1000;
1+
// 14 minutes 57 seconds in ms
2+
const ALMOST_FIFTEEN_MINUTES_MS = 15 * 60 * 1000 - 3000;
3+
const THREE_SECONDS = 3 * 1000;
44

55
const maxClickAttempts = 5;
66
let isEnabled;
@@ -23,7 +23,7 @@ const IntervalOperator = () => {
2323
const interval = IntervalOperator();
2424

2525
function isLive() {
26-
return !!document.getElementsByClassName('live-indicator')[0];
26+
return !!document.getElementsByClassName('live-indicator-container')[0];
2727
}
2828

2929
function attemptToClick() {
@@ -46,7 +46,7 @@ function waitForBonusButton() {
4646
clickAttempts ++;
4747

4848
if (!clicked && clickAttempts > maxClickAttempts) {
49-
pauseFor(FIVE_SECONDS);
49+
pauseFor(THREE_SECONDS);
5050
}
5151
}, 1000);
5252
}
@@ -72,7 +72,7 @@ function waitForWhenLive() {
7272
interval.clear();
7373
waitForBonusButton();
7474
}
75-
}, FIVE_SECONDS);
75+
}, THREE_SECONDS);
7676
}
7777

7878

0 commit comments

Comments
 (0)