From eb318ef7a4de10cf8e2701038580393cdf25453b Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 1 Feb 2020 15:05:59 +0200 Subject: [PATCH] Move calling of script _startup inside try-catch block --- profile/chrome/utils/boot.jsm | 10 +++++----- program/config.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/profile/chrome/utils/boot.jsm b/profile/chrome/utils/boot.jsm index b6e42d7..9227a72 100644 --- a/profile/chrome/utils/boot.jsm +++ b/profile/chrome/utils/boot.jsm @@ -158,12 +158,12 @@ let _uc = { if (!script.regex.test(win.location.href) || !script.isEnabled) { return } - if (script.onlyonce && script.isRunning) { - _uc.maybeRunStartUp(script,win) - return - } - try { + if (script.onlyonce && script.isRunning) { + _uc.maybeRunStartUp(script,win) + return + } + Services.scriptloader.loadSubScript(`chrome://userscripts/content/${script.filename}`, win); script.isRunning = true; diff --git a/program/config.js b/program/config.js index d920b0b..1e9a54a 100644 --- a/program/config.js +++ b/program/config.js @@ -17,4 +17,4 @@ try { Cu.import('chrome://userchromejs/content/boot.jsm'); } -} catch(ex) {}; +} catch(ex) {}; \ No newline at end of file