diff --git a/4chan_x.user.js b/4chan_x.user.js index 8f0152165..b1334e93f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2113,6 +2113,7 @@ id: 'overlay' }); $.on(overlay, 'click', function() { + d.body.style.removeProperty('overflow'); return $.rm(overlay); }); $.on(dialog, 'click', function(e) { @@ -2120,6 +2121,7 @@ }); $.add(overlay, dialog); $.add(d.body, overlay); + d.body.style.setProperty('overflow', 'hidden', 'important'); options.backlink.call(back); options.time.call(time); return options.favicon.call(favicon); diff --git a/script.coffee b/script.coffee index 329c28c48..4ebedb04c 100644 --- a/script.coffee +++ b/script.coffee @@ -1647,10 +1647,13 @@ options = indicators[@name].hidden = @checked overlay = $.el 'div', id: 'overlay' - $.on overlay, 'click', -> $.rm overlay + $.on overlay, 'click', -> + d.body.style.removeProperty 'overflow' + $.rm overlay $.on dialog, 'click', (e) -> e.stopPropagation() $.add overlay, dialog $.add d.body, overlay + d.body.style.setProperty 'overflow', 'hidden', 'important' options.backlink.call back options.time.call time