Add option to ignore content manager errors

This commit is contained in:
Samuel Elliott 2018-03-07 19:57:00 +00:00
parent 1ddb93bd5d
commit 0bbd7b506a
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
3 changed files with 75 additions and 5 deletions

View File

@ -45,6 +45,13 @@
"hint": "BetterDiscord developer mode",
"value": false,
"disabled": true
},
{
"id": "ignore-content-manager-errors",
"type": "bool",
"text": "Ignore content manager errors",
"hint": "Only when starting Discord. It gets annoying when you're reloading Discord often and have plugins that are meant to fail.",
"value": false
}
]
}

View File

@ -29,7 +29,9 @@ class BetterDiscord {
window.bdmodals = Modals;
window.bdlogs = Logger;
window.emotes = EmoteModule;
EmoteModule.observe();
DOM.injectStyle(BdCss, 'bdmain');
Events.on('global-ready', this.globalReady.bind(this));
}
@ -42,20 +44,21 @@ class BetterDiscord {
await ExtModuleManager.loadAllModules(true);
await PluginManager.loadAllPlugins(true);
await ThemeManager.loadAllThemes(true);
Modals.showContentManagerErrors();
if (!Settings.get('core', 'advanced', 'ignore-content-manager-errors'))
Modals.showContentManagerErrors();
Events.emit('ready');
Events.emit('discord-ready');
} catch (err) {
console.log('FAILED TO LOAD!', err);
Logger.err('main', ['FAILED TO LOAD!', err]);
}
}
globalReady() {
BdUI.initUiEvents();
this.vueInstance = BdUI.injectUi();
(async () => {
this.init();
})();
this.init();
}
}

60
package-lock.json generated
View File

@ -1323,6 +1323,15 @@
"integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=",
"dev": true
},
"binary-search-tree": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz",
"integrity": "sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q=",
"dev": true,
"requires": {
"underscore": "1.4.4"
}
},
"block-stream": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
@ -5652,6 +5661,12 @@
"integrity": "sha1-YSKJv7PCIOGGpYEYYY1b6MG6sCE=",
"dev": true
},
"immediate": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
"integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=",
"dev": true
},
"imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
@ -6293,6 +6308,15 @@
"type-check": "0.3.2"
}
},
"lie": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
"integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=",
"dev": true,
"requires": {
"immediate": "3.0.6"
}
},
"liftoff": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz",
@ -6347,6 +6371,15 @@
"json5": "0.5.1"
}
},
"localforage": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/localforage/-/localforage-1.6.0.tgz",
"integrity": "sha1-iwBZvus4dcSBJChsp/2/I9UrjJc=",
"dev": true,
"requires": {
"lie": "3.1.1"
}
},
"locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
@ -6979,6 +7012,27 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
"nedb": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz",
"integrity": "sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg=",
"dev": true,
"requires": {
"async": "0.2.10",
"binary-search-tree": "0.2.5",
"localforage": "1.6.0",
"mkdirp": "0.5.1",
"underscore": "1.4.4"
},
"dependencies": {
"async": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
"integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=",
"dev": true
}
}
},
"neo-async": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.0.tgz",
@ -10569,6 +10623,12 @@
"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
"dev": true
},
"underscore": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
"integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ=",
"dev": true
},
"union-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",