Only use workaround for Chrome settings being async in Chrome extension.
This commit is contained in:
parent
f986bfd984
commit
218c758173
@ -50,7 +50,7 @@ Main =
|
|||||||
Conf['Oekaki Links'] = true
|
Conf['Oekaki Links'] = true
|
||||||
|
|
||||||
# Pseudo-enforce default whitelist while configuration loads
|
# Pseudo-enforce default whitelist while configuration loads
|
||||||
$.global ->
|
if $.platform is 'crx' then $.global ->
|
||||||
{whitelist} = document.currentScript.dataset
|
{whitelist} = document.currentScript.dataset
|
||||||
whitelist = whitelist.split('\n').filter (x) -> x[0] isnt "'"
|
whitelist = whitelist.split('\n').filter (x) -> x[0] isnt "'"
|
||||||
oldFun = {}
|
oldFun = {}
|
||||||
@ -72,11 +72,10 @@ Main =
|
|||||||
items[key] = undefined for key of Conf
|
items[key] = undefined for key of Conf
|
||||||
items['previousversion'] = undefined
|
items['previousversion'] = undefined
|
||||||
($.getSync or $.get) items, (items) ->
|
($.getSync or $.get) items, (items) ->
|
||||||
|
|
||||||
# Enforce JS whitelist
|
# Enforce JS whitelist
|
||||||
jsWhitelist = items['jsWhitelist'] ? Conf['jsWhitelist']
|
jsWhitelist = items['jsWhitelist'] ? Conf['jsWhitelist']
|
||||||
$.addCSP "script-src #{jsWhitelist.replace(/[\s;]+/g, ' ')}"
|
$.addCSP "script-src #{jsWhitelist.replace(/[\s;]+/g, ' ')}"
|
||||||
$.event 'csp-ready'
|
$.event 'csp-ready' if $.platform is 'crx'
|
||||||
|
|
||||||
$.asap docSet, ->
|
$.asap docSet, ->
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user