Disable WebWorkers by default

This commit is contained in:
yflory
2018-06-26 14:15:25 +02:00
parent bfb850554d
commit 6dc7e7eff4
2 changed files with 12 additions and 1 deletions

View File

@@ -906,7 +906,11 @@ define([
var msgEv = Util.mkEvent();
var postMsg, worker;
var noWorker = false;
var noWorker = AppConfig.disableWorkers || false;
if (localStorage.CryptPad_noWorkers) {
noWorker = localStorage.CryptPad_noWorkers === '1';
console.error('WebWorker/SharedWorker state forced to ' + !noWorker);
}
Nthen(function (waitFor2) {
if (Worker) {
var w = waitFor2();