aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/utils')
-rw-r--r--vnext/src/utils/embed.js14
1 files changed, 7 insertions, 7 deletions
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 = `<a href="${aNode.href}"><img src="${aNode.href}"></a>`;
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 = `<a href="${aNode.href}"><img src="${aNode.href}"></a>`;
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 = `<video src="${aNode.href}" title="${aNode.href}" controls></video>`;
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 = `<audio src="${aNode.href}" title="${aNode.href}" controls></audio>`;
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';