Update communicator.js
diff --git a/chrome/communicator.js b/chrome/communicator.js
index fb8d380..a63162f 100644
--- a/chrome/communicator.js
+++ b/chrome/communicator.js
@@ -1,8 +1,9 @@
if (window.location.pathname.split("/")[3] == "portal") {
$(document).ready(function() {
-if ((window.localStorage.disableAutoLoad == undefined) || (window.localStorage.disableAutoLoad == "false")) {
-console.log("[DTPS Chrome] Automatically loading Project DTPS");
+ var url = 'https://dtps.js.org/init.js'
+if (window.localStorage.devAutoLoad == "true") var url = 'https://dtps.js.org/dev.js'
+
window.dtpsLoader = 2;
window.dtpsExtension = true;
document.addEventListener('extensionData', function(e) {
@@ -12,12 +13,14 @@
}));
}
});
-var url = 'https://dtps.js.org/init.js'
-if (window.localStorage.devAutoLoad == "true") var url = 'https://dtps.js.org/dev.js'
+
+if ((window.localStorage.disableAutoLoad == undefined) || (window.localStorage.disableAutoLoad == "false")) {
+console.log("[DTPS Chrome] Automatically loading Project DTPS");
$.getScript(url);
} else {
- jQuery("#myacc_dmenu").prepend(`<div class="dmoption" role="menuitem" taborder="-1" onclick="localStorage.setItem('disableAutoLoad', false); window.location.reload();"><a href="javascript:;" role="menuitem">Enable Power+</a></div>`)
+ jQuery("#global_top_links").append(`<a onclick="javascript:jQuery.getScript('` + url + `');dtpsLoader=2;">Power+` + (window.localStorage.devAutoLoad == "true" ? " (dev)" : "") + `</a>`)
}
+
});
-}
\ No newline at end of file
+}