aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/assets/embed.js15
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;
+ }
+ },
];
}