From ecc545b71e93aa2d91d522acb86d5a702ca2024a Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 4 Jun 2020 16:18:21 +0200 Subject: [PATCH] stuff --- Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js b/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js index 5bb636e78b..940504492c 100644 --- a/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js +++ b/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js @@ -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 {