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

View File

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