This commit is contained in:
Mirco Wittrien 2020-06-04 16:18:21 +02:00
parent 314889bf90
commit ecc545b71e
1 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ var ForceImagePreviews = (_ => {
return class ForceImagePreviews {
getName () {return "ForceImagePreviews";}
getVersion () {return "1.1.8";}
getVersion () {return "1.1.9";}
getAuthor () {return "DevilBro";}
@ -12,7 +12,7 @@ var ForceImagePreviews = (_ => {
constructor () {
this.changelog = {
"fixed":[["Imgur","No longer double emebds imgur images"], ["Youtube","No longer double embeds some special youtube links like 'youtu.be'"]]
"fixed":[["Youtube","No longer double embeds some special youtube links like 'youtu.be'... again"]]
};
this.patchedModules = {
@ -143,7 +143,7 @@ var ForceImagePreviews = (_ => {
isEmbedded (embeds, link) {
if (link.indexOf("youtube.") > -1 || link.indexOf("youtu.be") > -1) {
let videoId = link.split("watch?v=")[1] || link.split("?")[0].split("/").pop();
let videoId = (link.split("watch?v=")[1] || link.split("?")[0].split("/").pop() || "").split("&").shift();
if (videoId) for (let embed of embeds) if (embed.url == link || embed.video && embed.url.indexOf(videoId) > -1) return true;
}
else {