Fix race condition in disabling native extension. #938

This commit is contained in:
ccd0 2016-06-05 00:08:26 -07:00
parent 218c758173
commit de0dbbf5da

View File

@ -28,8 +28,8 @@ Settings =
settings.disableAll = true settings.disableAll = true
localStorage.setItem '4chan-settings', JSON.stringify settings localStorage.setItem '4chan-settings', JSON.stringify settings
else else
$.onExists doc, 'body', -> $.global ->
$.global -> window.Config.disableAll = true Object.defineProperty window, 'Config', {value: {disableAll: true}}
open: (openSection) -> open: (openSection) ->
return if Settings.overlay return if Settings.overlay