forked from WG-SpaceCoder/AutoTrimps
-
Notifications
You must be signed in to change notification settings - Fork 51
/
GraphsOnly.user.js
30 lines (30 loc) · 1.27 KB
/
GraphsOnly.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
// ==UserScript==
// @name AutoTrimpsV2+genBTC-GraphsOnly
// @namespace https://github.com/genbtc/AutoTrimps
// @version 2.1.6.9-genbtc-3-23-2018
// @updateURL https://github.com/genbtc/AutoTrimps/GraphsOnly.user.js
// @description Graphs Module (only) from AutoTrimps
// @author zininzinin, spindrjr, belaith, ishakaru, genBTC
// @include *trimps.github.io*
// @include *kongregate.com/games/GreenSatellite/trimps
// @grant none
// ==/UserScript==
//this comes from AutoTrimps/modules/utils.js , then we dont need to load everything from that file.
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.");
}
}
}
//This can be edited to point to your own Github Repository URL.
var basepath = 'https://genbtc.github.io/AutoTrimps/';
var script = document.createElement('script');
script.id = 'AutoTrimps-Graphs';
script.src = basepath + 'Graphs.js';
//script.setAttribute('crossorigin',"use-credentials");
script.setAttribute('crossorigin',"anonymous");
document.head.appendChild(script);