-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPredictor.user.js
35 lines (26 loc) · 1021 Bytes
/
Predictor.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
// ==UserScript==
// @name IdleLoops Predictor 4_za_4s
// @namespace https://github.com/4za4s/
// @version 0.0
// @description Predicts the amount of resources spent and gained by each action in the action list.
// @author 4_za_4s
// @match *://omsi6.github.io/loops/*
// @grant none
// ==/UserScript==
const Predictor = {
predict: () => {
//-------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------
},
run: () => {
if (!view._updateNextActions) {
view._updateNextActions = view.updateNextActions;
}
// Hook `updateNextActions` with the predictor's update function
view.updateNextActions = () => {
view._updateNextActions();
Predictor.predict();
};
}
}
setTimeout(() => document.readyState == 'complete' && Predictor.run(), 2000);