%NAME is indeed better

This commit is contained in:
ParrotParrot 2014-01-25 20:31:27 +01:00
parent 1118b38026
commit dbd4de88b1

View File

@ -15,7 +15,7 @@ Sauce =
name: 'Sauce' name: 'Sauce'
cb: @node cb: @node
createSauceLink: (link) -> createSauceLink: (link) ->
link = link.replace /%(T?URL|MD5|board|FNAME)/g, (parameter) -> link = link.replace /%(T?URL|MD5|board|NAME)/g, (parameter) ->
switch parameter switch parameter
when '%TURL' when '%TURL'
"' + encodeURIComponent(post.file.thumbURL) + '" "' + encodeURIComponent(post.file.thumbURL) + '"
@ -25,7 +25,7 @@ Sauce =
"' + encodeURIComponent(post.file.MD5) + '" "' + encodeURIComponent(post.file.MD5) + '"
when '%board' when '%board'
"' + encodeURIComponent(post.board) + '" "' + encodeURIComponent(post.board) + '"
when '%FNAME' when '%NAME'
"' + encodeURIComponent(post.file.name) + '" "' + encodeURIComponent(post.file.name) + '"
else else
parameter parameter