musescore-downloader

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit a3c54c5ebf8e33f3648e33400569baab0fc47f69
parent 3c667fcdfb76621f2b70849f762db09c1c2244b8
Author: Xmader <xmader@outlook.com>
Date:   Sun,  3 Nov 2019 15:12:15 -0500

v0.1.2 - debug, 修复按钮宽度问题

Diffstat:
Mdist/main.js | 7++++---
Mpackage.json | 2+-
Msrc/main.ts | 6++++--
3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dist/main.js b/dist/main.js @@ -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.1.1 +// @version 0.1.2 // @description 免登录、免 Musescore Pro,下载 musescore.com 上的曲谱 // @author Xmader // @match https://musescore.com/user/*/scores/* @@ -27,7 +27,7 @@ const scorePlayer = window.UGAPP.store.jmuse_settings.score_player; const { id, vid } = scorePlayer.json; const baseURL = scorePlayer.urls.image_path; - const scoreHexId = baseURL.split("/").filter(Boolean).reverse()[1]; + const scoreHexId = baseURL.split("/").filter(Boolean).reverse()[0]; const msczURL = `https://musescore.com/static/musescore/scoredata/score/${getIndexPath(id)}/${id}/score_${vid}_${scoreHexId}.mscz`; const pdfURL = baseURL + "score_full.pdf"; const mxlURL = baseURL + "score.mxl"; @@ -48,7 +48,8 @@ btn.onclick = () => { window.open(url); }; - const span = downloadBtn.querySelector("span"); + btn.setAttribute("style", "width: 205px !important"); + const span = btn.querySelector("span"); span.textContent = `Download ${name}`; return btn; }); diff --git a/package.json b/package.json @@ -1,6 +1,6 @@ { "name": "musescore-downloader", - "version": "0.1.1", + "version": "0.1.2", "description": "免登录、免 Musescore Pro,下载 musescore.com 上的曲谱", "main": "dist/main.js", "repository": { diff --git a/src/main.ts b/src/main.ts @@ -8,7 +8,7 @@ const scorePlayer: ScorePlayerData = window.UGAPP.store.jmuse_settings.score_pla const { id, vid } = scorePlayer.json const baseURL = scorePlayer.urls.image_path -const scoreHexId = baseURL.split("/").filter(Boolean).reverse()[1] +const scoreHexId = baseURL.split("/").filter(Boolean).reverse()[0] const msczURL = `https://musescore.com/static/musescore/scoredata/score/${getIndexPath(id)}/${id}/score_${vid}_${scoreHexId}.mscz` const pdfURL = baseURL + "score_full.pdf" @@ -35,7 +35,9 @@ const newDownloadBtns = Object.keys(downloadURLs).map((name) => { window.open(url) } - const span = downloadBtn.querySelector("span") + btn.setAttribute("style", "width: 205px !important") + + const span = btn.querySelector("span") span.textContent = `Download ${name}` return btn