From a4fc3e91622e7b9537a661490af92c6f6ee06398 Mon Sep 17 00:00:00 2001 From: eight Date: Sat, 13 Oct 2018 16:11:38 +0800 Subject: [PATCH] Fix: various --- background/background.js | 3 +-- background/style-manager.js | 6 ------ edit/regexp-tester.js | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/background/background.js b/background/background.js index 94da67a7..c7fa7ed0 100644 --- a/background/background.js +++ b/background/background.js @@ -1,4 +1,4 @@ -/* global detectSloppyRegexps download prefs openURL FIREFOX CHROME VIVALDI +/* global download prefs openURL FIREFOX CHROME VIVALDI openEditor debounce URLS ignoreChromeError queryTabs getTab styleManager msg navigatorUtil iconUtil workerUtil */ 'use strict'; @@ -34,7 +34,6 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, { }, getPrefs: prefs.getAll, - detectSloppyRegexps, openEditor, updateIconBadge(count) { diff --git a/background/style-manager.js b/background/style-manager.js index 19e08029..fda0aae8 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -358,12 +358,6 @@ const styleManager = (() => { .map(i => styles.get(i)) ); } - // if (filter && filter.id) { - // if (!cache.sections[filter.id]) { - // return {}; - // } - // return {[filter.id]: cache.sections[filter.id]}; - // } if (filter) { const sections = !filter.id ? Object.values(cache.sections) : cache.sections[filter.id] ? [cache.sections[filter.id]] : diff --git a/edit/regexp-tester.js b/edit/regexp-tester.js index 4ba609ba..348b5cb7 100644 --- a/edit/regexp-tester.js +++ b/edit/regexp-tester.js @@ -58,7 +58,7 @@ const regExpTester = (() => { const rxData = Object.assign({text}, cachedRegexps.get(text)); if (!rxData.urls) { cachedRegexps.set(text, Object.assign(rxData, { - // imitate buggy Stylish-for-chrome, see detectSloppyRegexps() + // imitate buggy Stylish-for-chrome rx: tryRegExp('^' + text + '$'), urls: new Map(), }));