TODO: figure out screen capture API
This commit is contained in:
parent
d74ddc5524
commit
2df26b8ce0
1 changed files with 2 additions and 11 deletions
13
main.js
13
main.js
|
|
@ -1,5 +1,3 @@
|
|||
// import html2canvas from '/html2canvas-pro.min.js';
|
||||
|
||||
const scheduleDOM = document.getElementById('schedule');
|
||||
|
||||
const VERSION = "v1.0.0";
|
||||
|
|
@ -117,18 +115,11 @@ function altText() {
|
|||
}
|
||||
|
||||
function copyClipboard() {
|
||||
html2canvas(scheduleDOM).then(/** @typeof HTMLCanvasElement */ canvas => {
|
||||
canvas.toBlob(blob => {
|
||||
const item = new ClipboardItem({ 'image/png': blob });
|
||||
navigator.clipboard.write([item]);
|
||||
})
|
||||
});
|
||||
// TODO: screen capture API: https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API
|
||||
}
|
||||
|
||||
function saveImage() {
|
||||
html2canvas(scheduleDOM).then(canvas => {
|
||||
document.body.appendChild(canvas);
|
||||
});
|
||||
// TODO: screen capture API: https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API
|
||||
}
|
||||
|
||||
function exportJSON() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue