Change auto noko to open reply in new tab.

This commit is contained in:
ahodesuka 2012-02-20 21:57:51 -06:00
parent f474a0c3c8
commit 0297ac9c95
3 changed files with 10 additions and 8 deletions

View File

@ -118,7 +118,7 @@
'Cooldown': [true, 'Prevent "flood detected" errors.'],
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.'],
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.'],
'Auto Noko': [true, 'Always redirect to your post unless you are in dump mode'],
'Open Reply in New Tab': [false, 'Open replies in a new tab that are made from the main board.'],
'Remember QR size': [false, 'Remember the size of the Quick reply (Firefox only).'],
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'],
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
@ -1867,7 +1867,7 @@
return qr.message.send(post);
},
response: function(html) {
var b, doc, err, node, persona, postNumber, reply, thread, _, _ref;
var b, doc, err, node, open, persona, postNumber, reply, thread, _, _ref;
doc = $.el('a', {
innerHTML: html
});
@ -1915,8 +1915,9 @@
} else {
qr.cooldown.auto = qr.replies.length > 1;
qr.cooldown.set(/sage/i.test(reply.email) ? 60 : 30);
if (conf['Auto Noko'] && !g.REPLY && !qr.cooldown.auto) {
location.href = "http://boards.4chan.org/" + g.BOARD + "/res/" + thread + "#" + postNumber;
if (conf['Open Reply in New Tab'] && !g.REPLY && !qr.cooldown.auto) {
open = GM_openInTab || window.open;
open("http://boards.4chan.org/" + g.BOARD + "/res/" + thread + "#" + postNumber, "_blank");
}
}
if (conf['Persistent QR'] || qr.cooldown.auto) {

View File

@ -1,6 +1,6 @@
master
- ahodesuka
Add auto noko option for replies from the main board and not dumping.
Add Open Reply in New Tab option for replies made from the main board (not dumping).
- Mayhem
The Filter now has per filter settings:
- Filter the OP along its thread, replies only, or both.

View File

@ -38,7 +38,7 @@ config =
'Cooldown': [true, 'Prevent "flood detected" errors.']
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.']
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.']
'Auto Noko': [true, 'Always redirect to your post unless you are in dump mode']
'Open Reply in New Tab': [false, 'Open replies in a new tab that are made from the main board.']
'Remember QR size': [false, 'Remember the size of the Quick reply (Firefox only).']
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.']
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.']
@ -1518,8 +1518,9 @@ qr =
# Enable auto-posting if we have stuff to post, disable it otherwise.
qr.cooldown.auto = qr.replies.length > 1
qr.cooldown.set if /sage/i.test reply.email then 60 else 30
# auto-noko
location.href = "http://boards.4chan.org/#{g.BOARD}/res/#{thread}##{postNumber}" if conf['Auto Noko'] && !g.REPLY && !qr.cooldown.auto
if conf['Open Reply in New Tab'] && !g.REPLY && !qr.cooldown.auto
open = GM_openInTab or window.open
open "http://boards.4chan.org/#{g.BOARD}/res/#{thread}##{postNumber}", "_blank"
if conf['Persistent QR'] or qr.cooldown.auto
reply.rm()