diff --git a/background/background.js b/background/background.js index 20033b52..ac530f57 100644 --- a/background/background.js +++ b/background/background.js @@ -4,11 +4,14 @@ global handleCssTransitionBug detectSloppyRegexps global openEditor global styleViaAPI global loadScript -global usercss +global usercss workerUtil */ 'use strict'; -var backgroundWorker = workerUtil.createWorker('/background/background-worker.js'); +// eslint-disable-next-line no-var +var backgroundWorker = workerUtil.createWorker({ + url: '/background/background-worker.js' +}); window.API_METHODS = Object.assign(window.API_METHODS || {}, { @@ -21,7 +24,7 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, { return download(msg.url, msg); }, parseCss({code}) { - return usercss.invokeWorker({action: 'parse', code}); + return backgroundWorker.parseMozFormat({code}); }, getPrefs: prefs.getAll, healthCheck: () => dbExec().then(() => true),