diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/assets/embed.js | 15 |
1 files changed, 14 insertions, 1 deletions
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 = `<a href="${aNode.href}"><img src="${mediaUrl}"></a>`; + return div; + } + }, ]; } |