diff --git a/index.html b/index.html index f6c36a1..89ced76 100644 --- a/index.html +++ b/index.html @@ -50,7 +50,7 @@

Instantgram

☁️ A bookmarklet for downloading images from Instagram.

- [instantgram 8.0.0]
+ [instantgram 8.0.0]
drag this button to the bookmark bar of your browser. diff --git a/lang/de-de/index.html b/lang/de-de/index.html index 73cb3fc..e33f2ce 100644 --- a/lang/de-de/index.html +++ b/lang/de-de/index.html @@ -50,7 +50,7 @@

Instantgram

☁️ Ein Bookmarklet, um Bilder auf Instagram herunterzuladen

- [instantgram 8.0.0]
+ [instantgram 8.0.0]
Ziehe diesen Button in die Favoritenleiste deines Browsers. diff --git a/lang/en-us/index.html b/lang/en-us/index.html index f6c36a1..89ced76 100644 --- a/lang/en-us/index.html +++ b/lang/en-us/index.html @@ -50,7 +50,7 @@

Instantgram

☁️ A bookmarklet for downloading images from Instagram.

- [instantgram 8.0.0]
+ [instantgram 8.0.0]
drag this button to the bookmark bar of your browser. diff --git a/lang/pt-br/index.html b/lang/pt-br/index.html index 2e29d11..3d7359b 100644 --- a/lang/pt-br/index.html +++ b/lang/pt-br/index.html @@ -50,7 +50,7 @@

Instantgram

☁️ Um bookmarklet para download de fotos do Instagram

- [instantgram 8.0.0]
+ [instantgram 8.0.0]
arraste o botão acima para a barra de favoritos do navegador diff --git a/scripts/bookmarkletify.js b/scripts/bookmarkletify.js index 5b7eb82..0f34e52 100644 --- a/scripts/bookmarkletify.js +++ b/scripts/bookmarkletify.js @@ -1,12 +1,14 @@ -const fs = require('fs'); -const pkg = require('../package.json') -const browserify = require('browserify'); -const bookmarkletify = require('bookmarkletify'); -const process = require('process'); const signale = require('signale'); +var bookmarkletify = require('bookmarkletify'); +var fs = require('fs'); +const process = require('process'); +const pkg = require('../package.json') signale.pending('Bookmarklet generating...'); +var instantgram = fs.readFileSync('./dist/main.js', 'utf8'); +var bookmarkletString = bookmarkletify(instantgram); + function hash() { if (process.argv[2] && process.argv[2] === '--dev') { return ' ' + Math.random().toString(36).substring(5, 15); @@ -15,17 +17,11 @@ function hash() { return ' ' + pkg.version; } -// Fix es6 generation -var b = browserify({ basedir: './', standalone: 'instantgram' }).transform('babelify').add('./dist/main.js').bundle((err, buf) => { - if (err) { - return console.log(err); - } - - let script = buf.toString(); - let output = bookmarkletify(script); +function button(bookmarklet) { + return '[instantgram' + hash() + ']'; +} - fs.writeFileSync('./src/_langs/partials/button.html', '[instantgram' + hash() + ']'); -}); +fs.writeFileSync('./src/_langs/partials/button.html', button(bookmarkletString)); signale.success('Bookmarklet generated'); diff --git a/src/_langs/partials/button.html b/src/_langs/partials/button.html index 95860b4..1f47117 100644 --- a/src/_langs/partials/button.html +++ b/src/_langs/partials/button.html @@ -1 +1 @@ -[instantgram 8.0.0] \ No newline at end of file +[instantgram 8.0.0] \ No newline at end of file