Skip to content

Instantly share code, notes, and snippets.

@maheshwaghmare
Created July 14, 2019 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maheshwaghmare/5e0b268504765ad65c5a350f9ce43922 to your computer and use it in GitHub Desktop.
Save maheshwaghmare/5e0b268504765ad65c5a350f9ce43922 to your computer and use it in GitHub Desktop.
Inject custom markup in the website while creating a screenshot with CLI (command line) using https://github.com/sindresorhus/capture-website-cli
window.onload = function() {
var x = document.querySelectorAll("h1");
x[1].innerHTML = "Mahesh Waghmare";
var x = document.querySelectorAll(".subheading");
x[1].innerHTML = "This Screenshot is generated with `capture-website-cli`. And also the string \"Mahesh Waghmare\" and this paragraph both are also injected with the JavaScript while creating https://wordpress.org/ web page screenshot.";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment