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, 'AddSettingsSection', Settings.addSection
|
||||||
$.on d, 'OpenSettings', (e) -> Settings.open e.detail
|
$.on d, 'OpenSettings', (e) -> Settings.open e.detail
|
||||||
|
|
||||||
if Conf['Disable Native Extension'] and $.hasStorage
|
if Conf['Disable Native Extension']
|
||||||
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
if $.hasStorage
|
||||||
return if settings.disableAll
|
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
||||||
settings.disableAll = true
|
return if settings.disableAll
|
||||||
localStorage.setItem '4chan-settings', JSON.stringify settings
|
settings.disableAll = true
|
||||||
|
localStorage.setItem '4chan-settings', JSON.stringify settings
|
||||||
|
else
|
||||||
|
$.onExists doc, 'body', false, ->
|
||||||
|
$.global -> window.Config.disableAll = true
|
||||||
|
|
||||||
open: (openSection) ->
|
open: (openSection) ->
|
||||||
return if Settings.overlay
|
return if Settings.overlay
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user