Fix native extension being invoked from event handlers.
This commit is contained in:
parent
3a11bae514
commit
e5f73f812b
@ -21,11 +21,15 @@ Settings =
|
||||
$.on d, 'AddSettingsSection', Settings.addSection
|
||||
$.on d, 'OpenSettings', (e) -> Settings.open e.detail
|
||||
|
||||
if Conf['Disable Native Extension'] and $.hasStorage
|
||||
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
||||
return if settings.disableAll
|
||||
settings.disableAll = true
|
||||
localStorage.setItem '4chan-settings', JSON.stringify settings
|
||||
if Conf['Disable Native Extension']
|
||||
if $.hasStorage
|
||||
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
||||
return if settings.disableAll
|
||||
settings.disableAll = true
|
||||
localStorage.setItem '4chan-settings', JSON.stringify settings
|
||||
else
|
||||
$.onExists doc, 'body', false, ->
|
||||
$.global -> window.Config.disableAll = true
|
||||
|
||||
open: (openSection) ->
|
||||
return if Settings.overlay
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user