This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* PhantomJS script to capture/render screenshots of the slides of a Reveal.js powered slideshow. | |
*/ | |
var page = require('webpage').create(); | |
var args = require('system').args; | |
// Get url to render from command line. | |
var url; | |
if (args.length < 2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simulates a paste event. | |
* | |
* @param pasteOptions Set of options for a simulated paste event. | |
* @param pasteOptions.destinationSelector Selector representing the DOM element that the paste event should be dispatched to. | |
* @param pasteOptions.pastePayload Simulated data that is on the clipboard. | |
* @param pasteOptions.pasteFormat The format of the simulated paste payload. Default value is 'text'. | |
*/ | |
function paste({ destinationSelector, pastePayload, pasteType = 'text' }) { | |
// https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event |