some cleanup
This commit is contained in:
parent
542d794253
commit
6985c24009
|
@ -332,7 +332,6 @@ Core.prototype.initObserver = function () {
|
|||
// onSwitch()
|
||||
// New Channel
|
||||
if (node.classList.contains("messages-wrapper") || node.querySelector(".messages-wrapper")) {
|
||||
console.log(node);
|
||||
self.inject24Hour(node);
|
||||
self.injectColoredText(node);
|
||||
pluginModule.channelSwitch();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -637,7 +637,7 @@ function loadApp() {
|
|||
getUtils().injectVar('bdVersion', _cfg.version);
|
||||
getUtils().injectVar('bdCdn', _cfg.CDN);
|
||||
|
||||
getUtils().updateLoading("Loading Resource (jQuery)", 0, 100);
|
||||
getUtils().log("Loading Resource (jQuery)", 0, 100);
|
||||
getUtils().injectJavaScriptSync("//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js", "load-jQueryCookie");
|
||||
}
|
||||
|
||||
|
@ -704,7 +704,7 @@ function ipcAsyncMessage(event, arg) {
|
|||
}
|
||||
|
||||
if(arg == "start-bd") {
|
||||
getUtils().updateLoading("Starting Up", 100, 100);
|
||||
getUtils().log("Starting Up", 100, 100);
|
||||
getUtils().execJs('var mainCore; var startBda = function() { mainCore = new Core(); mainCore.init(); }; startBda();');
|
||||
getUtils().saveLogs(_cfg.dataPath);
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ function loadExtData(extData) {
|
|||
|
||||
loadCounter++;
|
||||
|
||||
getUtils().updateLoading("Loading Resource (" + extData.resource + ")", loadCounter / Object.keys(_extData).length * 100, 100);
|
||||
getUtils().log("Loading Resource (" + extData.resource + ")", loadCounter / Object.keys(_extData).length * 100, 100);
|
||||
|
||||
var url = (_cfg.local && extData.localurl != null) ? extData.localurl : extData.url;
|
||||
|
||||
|
|
|
@ -94,6 +94,9 @@ Utils.prototype.jsLog = function(message, type) {
|
|||
|
||||
Utils.prototype.updateLoading = function(message, cur, max) {
|
||||
this.log(message);
|
||||
this.execJs('document.getElementById("bd-status").innerHTML = "BetterDiscord - '+message+' : ";');
|
||||
this.execJs('document.getElementById("bd-pbar").value = '+cur+';');
|
||||
this.execJs('document.getElementById("bd-pbar").max = '+max+';');
|
||||
}
|
||||
|
||||
//Logger
|
||||
|
|
Loading…
Reference in New Issue