File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/browser/extension/options Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,6 @@ const save = (key, value) => {
1010} ;
1111
1212const get = callback => {
13- if ( window . devToolsExtensionID && chrome . runtime . id !== window . devToolsExtensionID ) {
14- callback ( window . devToolsOptions ) ;
15- return ;
16- }
17-
1813 if ( options ) callback ( options ) ;
1914 else {
2015 chrome . storage . sync . get ( {
@@ -33,8 +28,17 @@ const get = callback => {
3328 }
3429} ;
3530
31+ const toArray = str => (
32+ str !== '' ? str . split ( '\n' ) : null
33+ ) ;
34+
3635const injectOptions = newOptions => {
3736 if ( ! newOptions ) return ;
37+ if ( newOptions . filter ) {
38+ newOptions . whitelist = toArray ( newOptions . whitelist ) ;
39+ newOptions . blacklist = toArray ( newOptions . blacklist ) ;
40+ }
41+
3842 options = newOptions ;
3943 let s = document . createElement ( 'script' ) ;
4044 s . type = 'text/javascript' ;
You can’t perform that action at this time.
0 commit comments