diff --git a/src/Images/Sauce.coffee b/src/Images/Sauce.coffee index b7ce89779..56a5abebc 100644 --- a/src/Images/Sauce.coffee +++ b/src/Images/Sauce.coffee @@ -15,7 +15,7 @@ Sauce = name: 'Sauce' cb: @node createSauceLink: (link) -> - link = link.replace /%(T?URL|MD5|board)/g, (parameter) -> + link = link.replace /%(T?URL|MD5|board|FNAME)/g, (parameter) -> switch parameter when '%TURL' "' + encodeURIComponent(post.file.thumbURL) + '" @@ -25,6 +25,8 @@ Sauce = "' + encodeURIComponent(post.file.MD5) + '" when '%board' "' + encodeURIComponent(post.board) + '" + when '%FNAME' + "' + encodeURIComponent(post.file.name) + '" else parameter text = if m = link.match(/;text:(.+)$/) then m[1] else link.match(/(\w+)\.\w+\//)[1]