I am looking to save a screenshot locally without displaying a download popup.
(function() {
'use strict';
$("body").prepend(`
<button id="btCapture">SCREENSHOT</button>
<input type="submit" value="Take Screenshot Of Div" onclick="capture();" />
<form method="POST" enctype="multipart/form-data" action="save.php" id="myForm">
<input type="hidden" name="img_val" id="img_val" value="" />
</form>
<div></div>
`);
document.getElementById("btCapture").onclick = function() { generate(); };
// Function to convert URLs to absolute
(function(exports) {
// Code for converting URLs
})(window);
});