diff --git a/builds/4chan-X.js b/builds/4chan-X.js index c2238eaa6..4c1233ca4 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -9564,7 +9564,8 @@ (sectionToOpen ? sectionToOpen : links[0]).click(); $.on($('.close', dialog), 'click', Settings.close); $.on(overlay, 'click', Settings.close); - return $.add(d.body, [overlay, dialog]); + $.add(d.body, [overlay, dialog]); + return $.event('OpenSettings', null, dialog); }, close: function() { if (!Settings.dialog) { @@ -9600,7 +9601,8 @@ $.rmAll(section); section.className = "section-" + this.hyphenatedTitle; this.open(section, g); - return section.scrollTop = 0; + section.scrollTop = 0; + return $.event('OpenSettings', null, section); }, main: function(section) { var arr, button, description, div, fs, hiddenNum, input, inputs, items, key, obj, _ref; diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 16743b31f..bb7037b2b 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -9573,7 +9573,8 @@ (sectionToOpen ? sectionToOpen : links[0]).click(); $.on($('.close', dialog), 'click', Settings.close); $.on(overlay, 'click', Settings.close); - return $.add(d.body, [overlay, dialog]); + $.add(d.body, [overlay, dialog]); + return $.event('OpenSettings', null, dialog); }, close: function() { if (!Settings.dialog) { @@ -9609,7 +9610,8 @@ $.rmAll(section); section.className = "section-" + this.hyphenatedTitle; this.open(section, g); - return section.scrollTop = 0; + section.scrollTop = 0; + return $.event('OpenSettings', null, section); }, main: function(section) { var arr, button, description, div, fs, hiddenNum, input, inputs, items, key, obj, _ref; diff --git a/builds/crx/script.js b/builds/crx/script.js index 6d43d55ab..e05113fec 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -9556,7 +9556,8 @@ (sectionToOpen ? sectionToOpen : links[0]).click(); $.on($('.close', dialog), 'click', Settings.close); $.on(overlay, 'click', Settings.close); - return $.add(d.body, [overlay, dialog]); + $.add(d.body, [overlay, dialog]); + return $.event('OpenSettings', null, dialog); }, close: function() { if (!Settings.dialog) { @@ -9592,7 +9593,8 @@ $.rmAll(section); section.className = "section-" + this.hyphenatedTitle; this.open(section, g); - return section.scrollTop = 0; + section.scrollTop = 0; + return $.event('OpenSettings', null, section); }, main: function(section) { var arr, button, description, div, fs, hiddenNum, input, inputs, items, key, obj, _ref; diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 514f37501..8f27bf2ed 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -76,6 +76,8 @@ Settings = $.add d.body, [overlay, dialog] + $.event 'OpenSettings', null, dialog + close: -> return unless Settings.dialog $.rm Settings.overlay @@ -98,6 +100,7 @@ Settings = section.className = "section-#{@hyphenatedTitle}" @open section, g section.scrollTop = 0 + $.event 'OpenSettings', null, section main: (section) -> items = {}