From 11715d0a3b784d5f748d7a5d5fa7778ec93f8616 Mon Sep 17 00:00:00 2001 From: benji7425 Date: Fri, 30 Dec 2016 15:28:36 +0000 Subject: [PATCH] Updated link standardisation to remove everything after ampersand --- feed-bot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feed-bot.js b/feed-bot.js index 9310b2c..f976b11 100644 --- a/feed-bot.js +++ b/feed-bot.js @@ -121,8 +121,8 @@ var YouTube = { var Links = { standardise: function (link) { - //cheaty way to get around http and https not matching - return link.replace("https://", "http://"); + //cheaty way to get around http and https not matching, and quick way to chop off stuff like &feature=youtube etc + return link.replace("https://", "http://").split("&")[0]; }, messageContainsLink: function (message) { var messageLower = message.toLowerCase();