v0.3.4 - add cleanup
This commit is contained in:
parent
0c3dccb1f3
commit
142324c767
3 changed files with 12 additions and 4 deletions
7
dist/main.js
vendored
7
dist/main.js
vendored
|
@ -3,7 +3,7 @@
|
|||
// @namespace https://www.xmader.com/
|
||||
// @homepageURL https://github.com/Xmader/musescore-downloader/
|
||||
// @supportURL https://github.com/Xmader/musescore-downloader/issues
|
||||
// @version 0.3.3
|
||||
// @version 0.3.4
|
||||
// @description 免登录、免 Musescore Pro,下载 musescore.com 上的曲谱
|
||||
// @author Xmader
|
||||
// @match https://musescore.com/*/*
|
||||
|
@ -26016,7 +26016,10 @@ Please pipe the document into a Node stream.\
|
|||
document.body.appendChild(canvas);
|
||||
canvasContext.clearRect(0, 0, width, height);
|
||||
canvasContext.drawImage(imageElement, 0, 0);
|
||||
return canvas.toDataURL("image/png");
|
||||
const data = canvas.toDataURL("image/png");
|
||||
canvas.remove();
|
||||
imageElement.remove();
|
||||
return data;
|
||||
});
|
||||
const generatePDF = (svgURLs, name) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
if (pdfBlob) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "musescore-downloader",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"description": "download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱",
|
||||
"main": "dist/main.js",
|
||||
"repository": {
|
||||
|
|
|
@ -34,7 +34,12 @@ const svgToPng = async (svgURL: string) => {
|
|||
canvasContext.clearRect(0, 0, width, height)
|
||||
canvasContext.drawImage(imageElement, 0, 0)
|
||||
|
||||
return canvas.toDataURL("image/png")
|
||||
const data = canvas.toDataURL("image/png")
|
||||
|
||||
canvas.remove()
|
||||
imageElement.remove()
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
const generatePDF = async (svgURLs: string[], name?: string) => {
|
||||
|
|
Loading…
Reference in a new issue