-
Notifications
You must be signed in to change notification settings - Fork 2
/
ninja.onload.js
29 lines (29 loc) · 1.34 KB
/
ninja.onload.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
// run unit tests
if (ninja.getQueryString()["unittests"] == "true" || ninja.getQueryString()["unittests"] == "1") {
ninja.unitTests.runSynchronousTests(true);
ninja.translator.showEnglishJson();
}
// run async unit tests
if (ninja.getQueryString()["asyncunittests"] == "true" || ninja.getQueryString()["asyncunittests"] == "1") {
ninja.unitTests.runAsynchronousTests(true);
}
// change language
ninja.translator.extractEnglishFromDomAndUpdateDictionary();
if (ninja.getQueryString()["culture"] != undefined) {
ninja.translator.translate(ninja.getQueryString()["culture"]);
} else {
ninja.translator.autoDetectTranslation();
}
// testnet, check if testnet edition should be activated
if (ninja.getQueryString()["testnet"] == "true" || ninja.getQueryString()["testnet"] == "1") {
document.getElementById("testnet").innerHTML = ninja.translator.get("testneteditionactivated");
document.getElementById("testnet").style.display = "block";
document.getElementById("detailwifprefix").innerHTML = "'9'";
document.getElementById("detailcompwifprefix").innerHTML = "'c'";
Bitcoin.Address.networkVersion = 0x6F; // testnet
Bitcoin.ECKey.privateKeyPrefix = 0xEF; // testnet
ninja.testnetMode = true;
}
if (ninja.getQueryString()["showseedpool"] == "true" || ninja.getQueryString()["showseedpool"] == "1") {
document.getElementById("seedpoolarea").style.display = "block";
}