less indentation
This commit is contained in:
parent
240a6d9045
commit
d60143a128
@ -1475,29 +1475,30 @@
|
|||||||
return parent.postMessage(data, '*');
|
return parent.postMessage(data, '*');
|
||||||
});
|
});
|
||||||
c = $('b').lastChild;
|
c = $('b').lastChild;
|
||||||
if (c.nodeType === 8) {
|
if (c.nodeType !== 8) {
|
||||||
_ref = c.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref[0], thread = _ref[1], id = _ref[2];
|
return;
|
||||||
search = location.search;
|
|
||||||
cooldown = /cooldown/.test(search);
|
|
||||||
noko = /noko/.test(search);
|
|
||||||
sage = /sage/.test(search);
|
|
||||||
watch = /watch/.test(search);
|
|
||||||
url = "http://boards.4chan.org/" + g.BOARD;
|
|
||||||
if (watch && thread === '0') {
|
|
||||||
url += "/res/" + id + "?watch";
|
|
||||||
} else if (noko) {
|
|
||||||
url += '/res/';
|
|
||||||
url += thread === '0' ? id : thread;
|
|
||||||
}
|
|
||||||
if (cooldown) {
|
|
||||||
duration = Date.now() + (sage ? 60 : 30) * 1000;
|
|
||||||
url += '?cooldown=' + duration;
|
|
||||||
}
|
|
||||||
if (noko) {
|
|
||||||
url += '#' + id;
|
|
||||||
}
|
|
||||||
return window.location = url;
|
|
||||||
}
|
}
|
||||||
|
_ref = c.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref[0], thread = _ref[1], id = _ref[2];
|
||||||
|
search = location.search;
|
||||||
|
cooldown = /cooldown/.test(search);
|
||||||
|
noko = /noko/.test(search);
|
||||||
|
sage = /sage/.test(search);
|
||||||
|
watch = /watch/.test(search);
|
||||||
|
url = "http://boards.4chan.org/" + g.BOARD;
|
||||||
|
if (watch && thread === '0') {
|
||||||
|
url += "/res/" + id + "?watch";
|
||||||
|
} else if (noko) {
|
||||||
|
url += '/res/';
|
||||||
|
url += thread === '0' ? id : thread;
|
||||||
|
}
|
||||||
|
if (cooldown) {
|
||||||
|
duration = Date.now() + (sage ? 60 : 30) * 1000;
|
||||||
|
url += '?cooldown=' + duration;
|
||||||
|
}
|
||||||
|
if (noko) {
|
||||||
|
url += '#' + id;
|
||||||
|
}
|
||||||
|
return window.location = url;
|
||||||
},
|
},
|
||||||
validateFileSize: function(e) {
|
validateFileSize: function(e) {
|
||||||
var file;
|
var file;
|
||||||
|
|||||||
@ -1204,29 +1204,31 @@ qr =
|
|||||||
parent.postMessage data, '*'
|
parent.postMessage data, '*'
|
||||||
|
|
||||||
c = $('b').lastChild
|
c = $('b').lastChild
|
||||||
if c.nodeType is 8 #comment node
|
|
||||||
[_, thread, id] = c.textContent.match(/thread:(\d+),no:(\d+)/)
|
|
||||||
|
|
||||||
{search} = location
|
return unless c.nodeType is 8 #comment node
|
||||||
cooldown = /cooldown/.test search
|
|
||||||
noko = /noko/ .test search
|
|
||||||
sage = /sage/ .test search
|
|
||||||
watch = /watch/ .test search
|
|
||||||
|
|
||||||
url = "http://boards.4chan.org/#{g.BOARD}"
|
[_, thread, id] = c.textContent.match(/thread:(\d+),no:(\d+)/)
|
||||||
|
|
||||||
if watch and thread is '0'
|
{search} = location
|
||||||
url += "/res/#{id}?watch"
|
cooldown = /cooldown/.test search
|
||||||
else if noko
|
noko = /noko/ .test search
|
||||||
url += '/res/'
|
sage = /sage/ .test search
|
||||||
url += if thread is '0' then id else thread
|
watch = /watch/ .test search
|
||||||
if cooldown
|
|
||||||
duration = Date.now() + (if sage then 60 else 30) * 1000
|
|
||||||
url += '?cooldown=' + duration
|
|
||||||
if noko
|
|
||||||
url += '#' + id
|
|
||||||
|
|
||||||
window.location = url
|
url = "http://boards.4chan.org/#{g.BOARD}"
|
||||||
|
|
||||||
|
if watch and thread is '0'
|
||||||
|
url += "/res/#{id}?watch"
|
||||||
|
else if noko
|
||||||
|
url += '/res/'
|
||||||
|
url += if thread is '0' then id else thread
|
||||||
|
if cooldown
|
||||||
|
duration = Date.now() + (if sage then 60 else 30) * 1000
|
||||||
|
url += '?cooldown=' + duration
|
||||||
|
if noko
|
||||||
|
url += '#' + id
|
||||||
|
|
||||||
|
window.location = url
|
||||||
|
|
||||||
validateFileSize: (e) ->
|
validateFileSize: (e) ->
|
||||||
return unless @files[0].size > $('input[name=MAX_FILE_SIZE]').value
|
return unless @files[0].size > $('input[name=MAX_FILE_SIZE]').value
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user