From 1fc83f9b95c1969abf5b9521b547bb8d7a400c47 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 2 Mar 2014 19:13:16 -0700 Subject: [PATCH] MISTAKES WERE MADE! --- builds/4chan-X.user.js | 3 ++- builds/crx/script.js | 3 ++- src/Posting/QR.coffee | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index f151c5600..e114e2984 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -5843,7 +5843,7 @@ return $.addClass(doc, 'hide-original-post-form'); }); } - $.on('4chanXInitFinished', this.initReady); + $.on(d, '4chanXInitFinished', this.initReady); return Post.callbacks.push({ name: 'Quick Reply', cb: this.node @@ -5851,6 +5851,7 @@ }, initReady: function() { var link; + $.off(d, '4chanXInitFinished', this.initReady); QR.postingIsEnabled = !!$.id('postForm'); if (!QR.postingIsEnabled) { return; diff --git a/builds/crx/script.js b/builds/crx/script.js index 70a6fd72c..47a752c86 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -5895,7 +5895,7 @@ return $.addClass(doc, 'hide-original-post-form'); }); } - $.on('4chanXInitFinished', this.initReady); + $.on(d, '4chanXInitFinished', this.initReady); return Post.callbacks.push({ name: 'Quick Reply', cb: this.node @@ -5903,6 +5903,7 @@ }, initReady: function() { var link; + $.off(d, '4chanXInitFinished', this.initReady); QR.postingIsEnabled = !!$.id('postForm'); if (!QR.postingIsEnabled) { return; diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index a726634f7..ad22e1a40 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -30,13 +30,14 @@ QR = if Conf['Hide Original Post Form'] $.asap (-> doc), -> $.addClass doc, 'hide-original-post-form' - $.on '4chanXInitFinished', @initReady + $.on d, '4chanXInitFinished', @initReady Post.callbacks.push name: 'Quick Reply' cb: @node initReady: -> + $.off d, '4chanXInitFinished', @initReady QR.postingIsEnabled = !!$.id 'postForm' return unless QR.postingIsEnabled