Merge pull request #127 from MayhemYDG/master
(☞゚ヮ゚)☞ Magical auto noko ☜(゚ヮ゚☜)
This commit is contained in:
commit
37faaea73f
26
4chan_x.js
26
4chan_x.js
@ -1180,20 +1180,11 @@
|
|||||||
return qr.autohide.set();
|
return qr.autohide.set();
|
||||||
},
|
},
|
||||||
sys: function() {
|
sys: function() {
|
||||||
var board, c, id, recaptcha, thread, _, _ref, _ref2;
|
var c, id, recaptcha, thread, _, _ref;
|
||||||
if (recaptcha = $('#recaptcha_response_field')) {
|
if (recaptcha = $('#recaptcha_response_field')) {
|
||||||
$.bind(recaptcha, 'keydown', Recaptcha.listener);
|
$.bind(recaptcha, 'keydown', Recaptcha.listener);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
c = $('b').lastChild;
|
|
||||||
if (c.nodeType === 8) {
|
|
||||||
_ref = c.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref[0], thread = _ref[1], id = _ref[2];
|
|
||||||
if (thread === '0') {
|
|
||||||
_ref2 = $('meta', d).content.match(/4chan.org\/(\w+)\//), _ = _ref2[0], board = _ref2[1];
|
|
||||||
window.location = "http://boards.4chan.org/" + board + "/res/" + id + "#watch";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
http://code.google.com/p/chromium/issues/detail?id=20773
|
http://code.google.com/p/chromium/issues/detail?id=20773
|
||||||
Let content scripts see other frames (instead of them being undefined)
|
Let content scripts see other frames (instead of them being undefined)
|
||||||
@ -1201,11 +1192,20 @@
|
|||||||
To access the parent, we have to break out of the sandbox and evaluate
|
To access the parent, we have to break out of the sandbox and evaluate
|
||||||
in the global context.
|
in the global context.
|
||||||
*/
|
*/
|
||||||
return $.globalEval(function() {
|
$.globalEval(function() {
|
||||||
var data, _ref3;
|
var data, _ref;
|
||||||
data = ((_ref3 = document.querySelector('table font b')) != null ? _ref3.firstChild.textContent : void 0) || '';
|
data = ((_ref = document.querySelector('table font b')) != null ? _ref.firstChild.textContent : void 0) || '';
|
||||||
return parent.postMessage(data, '*');
|
return parent.postMessage(data, '*');
|
||||||
});
|
});
|
||||||
|
c = $('b').lastChild;
|
||||||
|
if (c.nodeType === 8) {
|
||||||
|
_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 {
|
||||||
|
return window.location = "http://boards.4chan.org/" + g.BOARD + "/res/" + thread + "#" + id;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
threading = {
|
threading = {
|
||||||
|
|||||||
@ -959,14 +959,6 @@ qr =
|
|||||||
$.bind recaptcha, 'keydown', Recaptcha.listener
|
$.bind recaptcha, 'keydown', Recaptcha.listener
|
||||||
return
|
return
|
||||||
|
|
||||||
c = $('b').lastChild
|
|
||||||
if c.nodeType is 8 #comment node
|
|
||||||
[_, thread, id] = c.textContent.match(/thread:(\d+),no:(\d+)/)
|
|
||||||
if thread is '0'
|
|
||||||
[_, board] = $('meta', d).content.match(/4chan.org\/(\w+)\//)
|
|
||||||
window.location = "http://boards.4chan.org/#{board}/res/#{id}#watch"
|
|
||||||
return
|
|
||||||
|
|
||||||
###
|
###
|
||||||
http://code.google.com/p/chromium/issues/detail?id=20773
|
http://code.google.com/p/chromium/issues/detail?id=20773
|
||||||
Let content scripts see other frames (instead of them being undefined)
|
Let content scripts see other frames (instead of them being undefined)
|
||||||
@ -978,6 +970,14 @@ qr =
|
|||||||
data = document.querySelector('table font b')?.firstChild.textContent or ''
|
data = document.querySelector('table font b')?.firstChild.textContent or ''
|
||||||
parent.postMessage data, '*'
|
parent.postMessage data, '*'
|
||||||
|
|
||||||
|
c = $('b').lastChild
|
||||||
|
if c.nodeType is 8 #comment node
|
||||||
|
[_, 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
|
||||||
|
window.location = "http://boards.4chan.org/#{g.BOARD}/res/#{thread}##{id}"
|
||||||
|
|
||||||
threading =
|
threading =
|
||||||
init: ->
|
init: ->
|
||||||
# don't thread image controls
|
# don't thread image controls
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user