From a4cefd02f100b750792694e679508ab306f6e4ed Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 29 Oct 2022 18:20:18 +0300 Subject: Fix array destructuring assignments --- vnext/src/utils/embed.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'vnext/src/utils') diff --git a/vnext/src/utils/embed.js b/vnext/src/utils/embed.js index 2e2f0aca..0c6fbd9c 100644 --- a/vnext/src/utils/embed.js +++ b/vnext/src/utils/embed.js @@ -154,7 +154,7 @@ function getEmbeddableLinkTypes() { className: 'picture compact', ctsDefault: false, re: /\.(jpe?g|png|svg)(:[a-zA-Z]+)?(?:\?[\w&;?=]*)?$/i, - makeNode: function(aNode, reResult, div) { + makeNode: function(aNode, _reResult, div) { div.innerHTML = ``; return div; } @@ -165,7 +165,7 @@ function getEmbeddableLinkTypes() { className: 'picture compact', ctsDefault: true, re: /\.gif(:[a-zA-Z]+)?(?:\?[\w&;?=]*)?$/i, - makeNode: function(aNode, reResult, div) { + makeNode: function(aNode, _reResult, div) { div.innerHTML = ``; return div; } @@ -176,7 +176,7 @@ function getEmbeddableLinkTypes() { className: 'video compact', ctsDefault: false, re: /\.(webm|mp4|m4v|ogv)(?:\?[\w&;?=]*)?$/i, - makeNode: function(aNode, reResult, div) { + makeNode: function(aNode, _reResult, div) { div.innerHTML = ``; return div; } @@ -187,7 +187,7 @@ function getEmbeddableLinkTypes() { className: 'audio singleColumn', ctsDefault: false, re: /\.(mp3|ogg|weba|opus|m4a|oga|wav)(?:\?[\w&;?=]*)?$/i, - makeNode: function(aNode, reResult, div) { + makeNode: function(aNode, _reResult, div) { div.innerHTML = ``; return div; } @@ -198,8 +198,8 @@ function getEmbeddableLinkTypes() { className: 'youtube resizableV singleColumn', ctsDefault: false, re: /^(?:https?:)?\/\/(?:www\.|m\.|gaming\.)?(?:youtu(?:(?:\.be\/|be\.com\/(?:v|embed)\/)([-\w]+)|be\.com\/watch)((?:(?:\?|&(?:amp;)?)(?:\w+=[-.\w]*[-\w]))*)|youtube\.com\/playlist\?list=([-\w]*)(&(amp;)?[-\w?=]*)?)/i, - makeNode: function(aNode, reResult, div) { - let [v, args, plist] = reResult; + makeNode: function(_aNode, reResult, div) { + let [, v, args, plist] = reResult; let iframeUrl; if (plist) { iframeUrl = '//www.youtube-nocookie.com/embed/videoseries?list=' + plist; @@ -276,7 +276,7 @@ function getEmbeddableLinkTypes() { className: 'tg compact', re: /https?:\/\/t\.me\/(\S+)/i, makeNode: function(aNode, reResult, div) { - let [post] = reResult; + let [, post] = reResult; // innerHTML cannot insert scripts, so... let script = document.createElement('script'); script.src = 'https://telegram.org/js/telegram-widget.js?18'; -- cgit v1.2.3