From f1b599c678aa0b756ec2eb02d67b868305d10b56 Mon Sep 17 00:00:00 2001 From: benji7425 Date: Fri, 30 Dec 2016 15:40:03 +0000 Subject: [PATCH] Added youtubeMode check for truncating link at ampersand --- feed-bot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feed-bot.js b/feed-bot.js index 52a4e2d..16bdc84 100644 --- a/feed-bot.js +++ b/feed-bot.js @@ -118,7 +118,9 @@ var YouTube = { var Links = { standardise: function (link) { - return link.replace("https://", "http://").split("&")[0]; //cheaty way to get around http and https not matching, and quick way to chop off stuff like &feature=youtube etc + link = link.replace("https://", "http://"); //cheaty way to get around http and https not matching + if(Config.youtubeMode) link = link.split("&")[0]; //quick way to chop off stuff like &feature=youtube etc + return link; }, messageContainsLink: function (message) { var messageLower = message.toLowerCase();