diff --git a/src/providers/Instagram.js b/src/providers/Instagram.js new file mode 100644 index 0000000..a5508c5 --- /dev/null +++ b/src/providers/Instagram.js @@ -0,0 +1,33 @@ +const Provider = require("./Provider"); +const _ = require("lodash"); + +/* + * Make sure to add + * + * in . + * + * I.e. + * + * metaInfo() { + return { + ... + script: [ + { src: 'https://www.instagram.com/embed.js', async: true, body: true, } + ] + }; + }, + */ + +class Instagram extends Provider { + constructor(options) { + super(options); + this.regexp = /(?:(?:http|https):\/\/)?(?:www\.)?instagr(?:\.am|am\.com)\/(?:p|tv)\/([a-z0-9-]{11})\/?/i; + this.template = __dirname + "/../templates/Instagram.hbs"; + this.idPosition = 1; + this.options = _.defaults(options, { + label: "View this post on Instagram", + }); + } +} + +module.exports = Instagram; diff --git a/src/templates/Instagram.hbs b/src/templates/Instagram.hbs new file mode 100644 index 0000000..c55f268 --- /dev/null +++ b/src/templates/Instagram.hbs @@ -0,0 +1,87 @@ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + +
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file