From 3b18a2792acc11472f7ae2c12ece0b71340152fd Mon Sep 17 00:00:00 2001 From: Jordan Bates Date: Thu, 16 May 2013 11:23:59 -0700 Subject: [PATCH] Add this back in --- LICENSE | 2 +- builds/4chan-X.js | 4 +++- builds/4chan-X.user.js | 4 +++- builds/crx/script.js | 4 +++- src/General/Main.coffee | 2 ++ 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index f7a747802..56c20427b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.5 - 2013-05-15 +* 4chan X - Version 1.2.5 - 2013-05-16 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.js b/builds/4chan-X.js index d0faf6be8..adf48a2d3 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -19,7 +19,7 @@ // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // ==/UserScript== /* -* 4chan X - Version 1.2.5 - 2013-05-15 +* 4chan X - Version 1.2.5 - 2013-05-16 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -10054,6 +10054,7 @@ } Conf['selectedArchives'] = {}; $.get(Conf, Main.initFeatures); + $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { var _ref; @@ -10184,6 +10185,7 @@ initStyle: function() { var MutationObserver, mainStyleSheet, observer, setStyle, style, styleSheets, _ref; + $.off(d, '4chanMainInit', Main.initStyle); if (!Main.isThisPageLegit() || $.hasClass(doc, 'fourchan-x')) { return; } diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 1916e9b62..45caffcdf 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -19,7 +19,7 @@ // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // ==/UserScript== /* -* 4chan X - Version 1.2.5 - 2013-05-15 +* 4chan X - Version 1.2.5 - 2013-05-16 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -10065,6 +10065,7 @@ } Conf['selectedArchives'] = {}; $.get(Conf, Main.initFeatures); + $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { var _ref; @@ -10195,6 +10196,7 @@ initStyle: function() { var MutationObserver, mainStyleSheet, observer, setStyle, style, styleSheets, _ref; + $.off(d, '4chanMainInit', Main.initStyle); if (!Main.isThisPageLegit() || $.hasClass(doc, 'fourchan-x')) { return; } diff --git a/builds/crx/script.js b/builds/crx/script.js index dc7b1a98c..d7235a219 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.5 - 2013-05-15 +* 4chan X - Version 1.2.5 - 2013-05-16 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -10046,6 +10046,7 @@ } Conf['selectedArchives'] = {}; $.get(Conf, Main.initFeatures); + $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { var _ref; @@ -10176,6 +10177,7 @@ initStyle: function() { var MutationObserver, mainStyleSheet, observer, setStyle, style, styleSheets, _ref; + $.off(d, '4chanMainInit', Main.initStyle); if (!Main.isThisPageLegit() || $.hasClass(doc, 'fourchan-x')) { return; } diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 00107b130..82e9c7a37 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -18,6 +18,7 @@ Main = $.get Conf, Main.initFeatures + $.on d, '4chanMainInit', Main.initStyle $.asap (-> d.head and $('link[rel="shortcut icon"]', d.head) or d.readyState in ['interactive', 'complete']), Main.initStyle @@ -132,6 +133,7 @@ Main = $.ready Main.initReady initStyle: -> + $.off d, '4chanMainInit', Main.initStyle return if !Main.isThisPageLegit() or $.hasClass doc, 'fourchan-x' # disable the mobile layout $('link[href*=mobile]', d.head)?.disabled = true