More cs tricks.

This commit is contained in:
Nicolas Stepien 2013-02-11 15:36:43 +01:00
parent f4f53b92f2
commit d4b5ef0307
2 changed files with 14 additions and 20 deletions

View File

@ -2066,12 +2066,12 @@
type: 'post', type: 'post',
el: div, el: div,
open: function(_arg) { open: function(_arg) {
var ID, board, redirect, thread; var board, postID, redirect, threadID;
ID = _arg.ID, thread = _arg.thread, board = _arg.board; postID = _arg.ID, threadID = _arg.thread, board = _arg.board;
redirect = Redirect.to({ redirect = Redirect.to({
board: board, postID: postID,
threadID: thread, threadID: threadID,
postID: ID board: board
}); });
return redirect !== ("//boards.4chan.org/" + board + "/"); return redirect !== ("//boards.4chan.org/" + board + "/");
}, },
@ -2092,12 +2092,12 @@
}); });
if (type === 'post') { if (type === 'post') {
open = function(_arg) { open = function(_arg) {
var ID, board, thread; var board, postID, threadID;
ID = _arg.ID, thread = _arg.thread, board = _arg.board; postID = _arg.ID, threadID = _arg.thread, board = _arg.board;
el.href = Redirect.to({ el.href = Redirect.to({
board: board, postID: postID,
threadID: thread, threadID: threadID,
postID: ID board: board
}); });
return true; return true;
}; };

View File

@ -947,11 +947,8 @@ ArchiveLink =
entry = entry =
type: 'post' type: 'post'
el: div el: div
open: ({ID, thread, board}) -> open: ({ID: postID, thread: threadID, board}) ->
redirect = Redirect.to redirect = Redirect.to {postID, threadID, board}
board: board
threadID: thread
postID: ID
redirect isnt "//boards.4chan.org/#{board}/" redirect isnt "//boards.4chan.org/#{board}/"
subEntries: [] subEntries: []
@ -975,11 +972,8 @@ ArchiveLink =
target: '_blank' target: '_blank'
if type is 'post' if type is 'post'
open = ({ID, thread, board}) -> open = ({ID: postID, thread: threadID, board}) ->
el.href = Redirect.to el.href = Redirect.to {postID, threadID, board}
board: board
threadID: thread
postID: ID
true true
else else
open = (post) -> open = (post) ->