Greasy Fork is available in English.
Screenshots current YT frame in full quality
< Feedback on YouTube ScreenShoter
this is how i modified the copy function so it would save the image. (Now it only saves, but i'm sure you'll be able to put an if/else for some preference variable to decide between copying and saving)
YouTubeScreenShoter.prototype.onCopyImage = function(blob) {
// navigator.clipboard.write([new window.ClipboardItem({
// "image/png": blob
// })]);
//blob to dataURL,
//https://stackoverflow.com/questions/23150333/html5-javascript-dataurl-to-blob-blob-to-dataurl#30407959
function blobToDataURL(blob, callback) {
var a = new FileReader();
a.onload = function(e) {callback(e.target.result);}
a.readAsDataURL(blob);
}
this.ss("video").pause()
console.log("downloading:", blob)
// download the datauri
blobToDataURL(blob, (dataURI) => {
GM_download({url: dataURI, name: `ytf-${new Date().getTime()}.png`})
})
};
Downloading feature is already exist. You can download it if you'll hold ctrl key during the click on the PRTSC button.
good script, please use
GM_download
(grant it first) to add an option to download the image instead of pasting it in clipboard. for example have a constant at the top of the script that saysconst downloadImage = false
and if the user changes it to true, it will download the image.