A client library to use our screenshotting service
Using Bower:
bower install screenrocket
Or grab the source (minified).
Basic usage is as follows:
var screenrocket = new Screenrocket({ apiKey: 'YOUR_API_KEY' });
screenrocket.render(options).done(function(data) {
$('document').append('<img src="' + data.url + '">')
});
Option | Default | Description |
---|---|---|
url | window.location.href |
The url to be screenshotted |
startX | 0 | The x coordinates to start the screenshot from |
startY | 0 | The y coordinates to start the screenshot from |
width | 1280 | The width of the screenshot |
height | 720 | The height of the screenshot |
viewportWidth | 1280 | The browser window width when screenshotting |
viewportHeight | 720 | The browser window height when screenshotting |
element | undefined | The selector of the element to be screenshotted (overrides start*/width/height values), only first element that matches will be screenshotted |
We'll check out your contribution if you:
- Provide a comprehensive suite of tests for your fork.
- Have a clear and documented rationale for your changes.
- Package these up in a pull request.
We'll do our best to help you out with any contribution issues you may have.
MIT. See LICENSE.txt
in this directory.