forked from Zorn192/AutoTrimps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphsOnly.js
49 lines (40 loc) · 1.51 KB
/
GraphsOnly.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
var ATversion = 'Zek v5.1.0',
atscript = document.getElementById('AutoTrimps-script'),
basepath = 'https://Zorn192.github.io/AutoTrimps/', //Link to your own Github here if you forked!
modulepath = 'modules/';
null !== atscript && (basepath = atscript.src.replace(/AutoTrimps2\.js$/, ''));
//var isSteam = false;
function ATscriptLoad(a, b) {
null == b && debug('Wrong Syntax. Script could not be loaded. Try ATscriptLoad(modulepath, \'example.js\'); ');
var c = document.createElement('script');
null == a && (a = ''), c.src = basepath + a + b + '.js', c.id = b + '_MODULE', document.head.appendChild(c)
}
function ATscriptUnload(a) {
var b = document.getElementById(a + "_MODULE");
b && (document.head.removeChild(b), debug("Removing " + a + "_MODULE", "other"))
}
function initializeGraphs() {
ATscriptLoad('', 'Graphs');
debug('AutoTrimps - Zek Graphs Only Fork Loaded!', '*spinner3');
}
function safeSetItems(name,data) {
try {
localStorage.setItem(name, data);
} catch(e) {
if (e.code == 22) {
// Storage full, maybe notify user or do some clean-up
debug("Error: LocalStorage is full, or error. Attempt to delete some portals from your graph or restart browser.");
}
}
}
var enableDebug = false;
function debug(message, type, lootIcon) {
var output = true;
if (output) {
if (enableDebug)
console.debug(0 + ' ' + message);
}
}
var MODULES = {}
var startupDelay = 1000;
setTimeout(initializeGraphs, startupDelay);