node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »



Allows iMacros for Firefox scripts to download remote binary resources and encode them as base64 strings. This could be useful for downloading files and then uploading them to other services

npm install -S download-base64-imacros


To use this module you will need to bundle your iMacros javascript source file with browserify. Say you have an imacros script called scrape.js which appears below

var downloadBase64 = require('download-base-64-imacros')
var url = ''
downloadBase64(url, function(err, base64) {
  if (err) {
    alert('error downloading remote file and encoding to a base64 string: ' + JSON.stringify(err))
  var output = {
    message: 'file downloaded and encoded successfully',
    base64: base64,
    url: url

To run scrape.js in Firefox execute the command

browserify scrape.js -o scrape_bundle.js

Then open up Firefox and run the scrape_bundle.js script. It is very import that you run scrape_bundle.js. Trying to execute scrape.js directly will not work


Browserify is a command-line tool which bundles js files into a single file so that you can use CommonJS style require(...) statements in your code. Get it by installing node and npm and then execute

[sudo] npm install -g browserify