Added youtubeMode check for truncating link at ampersand

This commit is contained in:
benji7425 2016-12-30 15:40:03 +00:00
parent fb61f2ee90
commit f1b599c678
1 changed files with 3 additions and 1 deletions

View File

@ -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();