From 7a2faf861efe0984f5417fb555e9b462435b3228 Mon Sep 17 00:00:00 2001 From: ParrotParrot <9bit.overflow@gmail.com> Date: Sat, 25 Jan 2014 20:10:40 +0100 Subject: [PATCH] Added %FNAME case to link.replace switch --- src/Images/Sauce.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]