Optional auto noko.
This commit is contained in:
parent
b1db8b6282
commit
b37af46ed8
@ -69,6 +69,7 @@
|
||||
config = {
|
||||
main: {
|
||||
Posting: {
|
||||
'Auto Noko': [true, 'Always redirect to your post'],
|
||||
'Cooldown': [true, 'Prevent \'flood detected\' errors'],
|
||||
'Quick Reply': [true, 'Reply without leaving the page'],
|
||||
'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.']
|
||||
@ -1387,7 +1388,7 @@
|
||||
_ref = c.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref[0], thread = _ref[1], id = _ref[2];
|
||||
if (thread === '0') {
|
||||
return window.location = "http://boards.4chan.org/" + g.BOARD + "/res/" + id + "#watch";
|
||||
} else {
|
||||
} else if (/AEOS.4chan_x.auto_noko=true/.test(d.cookie)) {
|
||||
return window.location = "http://boards.4chan.org/" + g.BOARD + "/res/" + thread + "#" + id;
|
||||
}
|
||||
}
|
||||
@ -2682,6 +2683,11 @@
|
||||
Recaptcha.init();
|
||||
$.bind(form, 'submit', qr.cb.submit);
|
||||
}
|
||||
if ($.config('Auto Noko')) {
|
||||
document.cookie = "" + NAMESPACE + "auto_noko=true;path=/;domain=.4chan.org";
|
||||
} else {
|
||||
document.cookie = "" + NAMESPACE + "auto_noko=false;path=/;domain=.4chan.org";
|
||||
}
|
||||
if ($.config('Cooldown')) {
|
||||
cooldown.init();
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ if console?
|
||||
config =
|
||||
main:
|
||||
Posting:
|
||||
'Auto Noko': [true, 'Always redirect to your post']
|
||||
'Cooldown': [true, 'Prevent \'flood detected\' errors']
|
||||
'Quick Reply': [true, 'Reply without leaving the page']
|
||||
'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.']
|
||||
@ -1128,7 +1129,7 @@ qr =
|
||||
[_, thread, id] = c.textContent.match(/thread:(\d+),no:(\d+)/)
|
||||
if thread is '0'
|
||||
window.location = "http://boards.4chan.org/#{g.BOARD}/res/#{id}#watch"
|
||||
else
|
||||
else if /AEOS.4chan_x.auto_noko=true/.test d.cookie
|
||||
window.location = "http://boards.4chan.org/#{g.BOARD}/res/#{thread}##{id}"
|
||||
|
||||
threading =
|
||||
@ -2095,6 +2096,11 @@ main =
|
||||
$.bind form, 'submit', qr.cb.submit
|
||||
|
||||
#major features
|
||||
if $.config 'Auto Noko'
|
||||
document.cookie = "#{NAMESPACE}auto_noko=true;path=/;domain=.4chan.org"
|
||||
else
|
||||
document.cookie = "#{NAMESPACE}auto_noko=false;path=/;domain=.4chan.org"
|
||||
|
||||
if $.config 'Cooldown'
|
||||
cooldown.init()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user