This commit is contained in:
Zixaphir 2013-03-19 09:34:42 -07:00
parent f50c1fcedf
commit b88ad38104
2 changed files with 9 additions and 15 deletions

View File

@ -20,7 +20,7 @@
// @icon data:image/gif;base64,R0lGODlhEAAQAKECAAAAAGbMM////////yH5BAEKAAIALAAAAAAQABAAAAIxlI+pq+D9DAgUoFkPDlbs7lGiI2bSVnKglnJMOL6omczxVZK3dH/41AG6Lh7i6qUoAAA7 // @icon data:image/gif;base64,R0lGODlhEAAQAKECAAAAAGbMM////////yH5BAEKAAIALAAAAAAQABAAAAIxlI+pq+D9DAgUoFkPDlbs7lGiI2bSVnKglnJMOL6omczxVZK3dH/41AG6Lh7i6qUoAAA7
// ==/UserScript== // ==/UserScript==
/* 4chan X Beta - Version 3.0.0 - 2013-03-18 /* 4chan X Beta - Version 3.0.0 - 2013-03-19
* http://mayhemydg.github.com/4chan-x/ * http://mayhemydg.github.com/4chan-x/
* *
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com> * Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
@ -6535,13 +6535,13 @@
return $.toggleClass(this, 'disabled'); return $.toggleClass(this, 'disabled');
}); });
Header.addShortcut(sc); Header.addShortcut(sc);
$.asap((function() { if (Conf['Hide Original Post Form']) {
return doc; $.asap((function() {
}), function() { return doc;
if (Conf['Hide Original Post Form']) { }), function() {
return $.addClass(doc, 'hide-original-post-form'); return $.addClass(doc, 'hide-original-post-form');
} });
}); }
$.on(d, '4chanXInitFinished', this.initReady); $.on(d, '4chanXInitFinished', this.initReady);
return Post.prototype.callbacks.push({ return Post.prototype.callbacks.push({
name: 'Quick Reply', name: 'Quick Reply',
@ -6553,9 +6553,6 @@
if (!QR.postingIsEnabled) { if (!QR.postingIsEnabled) {
return; return;
} }
if (Conf['Hide Original Post Form']) {
$.addClass(doc, 'hide-original-post-form');
}
if ($.engine === 'webkit') { if ($.engine === 'webkit') {
$.on(d, 'paste', QR.paste); $.on(d, 'paste', QR.paste);
} }

View File

@ -21,8 +21,8 @@ QR =
Header.addShortcut sc Header.addShortcut sc
$.asap (-> doc), -> if Conf['Hide Original Post Form']
if Conf['Hide Original Post Form'] $.asap (-> doc), ->
$.addClass doc, 'hide-original-post-form' $.addClass doc, 'hide-original-post-form'
$.on d, '4chanXInitFinished', @initReady $.on d, '4chanXInitFinished', @initReady
@ -35,9 +35,6 @@ QR =
QR.postingIsEnabled = !!$.id 'postForm' QR.postingIsEnabled = !!$.id 'postForm'
return unless QR.postingIsEnabled return unless QR.postingIsEnabled
if Conf['Hide Original Post Form']
$.addClass doc, 'hide-original-post-form'
if $.engine is 'webkit' if $.engine is 'webkit'
$.on d, 'paste', QR.paste $.on d, 'paste', QR.paste
$.on d, 'dragover', QR.dragOver $.on d, 'dragover', QR.dragOver