Get the form even if we hide the original post form.
This commit is contained in:
parent
023d645962
commit
6f9b6641de
@ -1227,6 +1227,7 @@
|
|||||||
},
|
},
|
||||||
asyncInit: function() {
|
asyncInit: function() {
|
||||||
var form, iframe, link, loadChecking, script, src;
|
var form, iframe, link, loadChecking, script, src;
|
||||||
|
form = $('form[name=post]');
|
||||||
if (Conf['Hide Original Post Form']) {
|
if (Conf['Hide Original Post Form']) {
|
||||||
link = $.el('h1', {
|
link = $.el('h1', {
|
||||||
innerHTML: "<a href=javascript:;>" + (g.REPLY ? 'Quick Reply' : 'New Thread') + "</a>"
|
innerHTML: "<a href=javascript:;>" + (g.REPLY ? 'Quick Reply' : 'New Thread') + "</a>"
|
||||||
@ -1236,7 +1237,6 @@
|
|||||||
if (!g.REPLY) $('select', QR.el).value = 'new';
|
if (!g.REPLY) $('select', QR.el).value = 'new';
|
||||||
return $('textarea', QR.el).focus();
|
return $('textarea', QR.el).focus();
|
||||||
});
|
});
|
||||||
form = d.forms[0];
|
|
||||||
$.before(form, link);
|
$.before(form, link);
|
||||||
}
|
}
|
||||||
if (/chrome/i.test(navigator.userAgent)) {
|
if (/chrome/i.test(navigator.userAgent)) {
|
||||||
|
|||||||
@ -1010,13 +1010,13 @@ QR =
|
|||||||
setTimeout @asyncInit
|
setTimeout @asyncInit
|
||||||
|
|
||||||
asyncInit: ->
|
asyncInit: ->
|
||||||
|
form = $ 'form[name=post]'
|
||||||
if Conf['Hide Original Post Form']
|
if Conf['Hide Original Post Form']
|
||||||
link = $.el 'h1', innerHTML: "<a href=javascript:;>#{if g.REPLY then 'Quick Reply' else 'New Thread'}</a>"
|
link = $.el 'h1', innerHTML: "<a href=javascript:;>#{if g.REPLY then 'Quick Reply' else 'New Thread'}</a>"
|
||||||
$.on $('a', link), 'click', ->
|
$.on $('a', link), 'click', ->
|
||||||
QR.open()
|
QR.open()
|
||||||
$('select', QR.el).value = 'new' unless g.REPLY
|
$('select', QR.el).value = 'new' unless g.REPLY
|
||||||
$('textarea', QR.el).focus()
|
$('textarea', QR.el).focus()
|
||||||
form = d.forms[0]
|
|
||||||
$.before form, link
|
$.before form, link
|
||||||
|
|
||||||
# CORS is ignored for content script on Chrome, but not Safari/Oprah/Firefox.
|
# CORS is ignored for content script on Chrome, but not Safari/Oprah/Firefox.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user