Screenshots single elements from Webpages using Firefox
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
package.json
screenshotElements.js
screenshots.config.js

README.md

firefox-element-screenshots

Screenshots single elements from Webpages

Setup

$ npm install and you´re good to go.

Configuration

You can configure the pages and elements you want to screenshots within screenshots.config.js.

Each page needs an object within the export of the module which looks like this:

{
  url: 'http://drublic.de/',
  elements: {
    'navigation': '.site-navigation'
  }
}

This is the configuration that is on the top of the screenshotElements.js file. Please modify it if needed.

// Your firefox binary (this is the default on OSX)
var firefoxBinary = '/Applications/Firefox.app/Contents/MacOS/firefox-bin';

// Folder for screenshots
var screenshotFolder = 'shots';

Run

Important: The script itself needs to start Firefox, it must be closed. The script dies if FF is already open!

$ node screenshotElements.js

Screenshots will end up in the shots subdirectory.