From ee1ef7c01aa317fe484b1da5e40d108f0ec2e5ef Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 10 Mar 2020 17:52:56 +0300 Subject: Embed Instagram media --- src/main/assets/embed.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/assets/embed.js b/src/main/assets/embed.js index 6498971c..079d07db 100644 --- a/src/main/assets/embed.js +++ b/src/main/assets/embed.js @@ -267,7 +267,20 @@ function getEmbeddableLinkTypes() { return div; } - } + }, + { + name: 'Instagram media', + id: 'embed_instagram_images', + className: 'picture compact', + ctsDefault: true, + re: /https?:\/\/www\.?instagram\.com(\/p\/\w+)\/?/i, + makeNode: function(aNode, reResult, div) { + let [url, postId] = reResult; + let mediaUrl = `https://instagr.am${postId}/media`; + div.innerHTML = ``; + return div; + } + }, ]; } -- cgit v1.2.3