Skip to content

Commit

Permalink
v0.15.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Nov 19, 2020
1 parent 4eade0a commit 63892a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// @supportURL https://github.com/Xmader/musescore-downloader/issues
// @updateURL https://msdl.librescore.org/install.user.js
// @downloadURL https://msdl.librescore.org/install.user.js
// @version 0.15.11
// @version 0.15.12
// @description download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱
// @author Xmader
// @match https://musescore.com/*/*
Expand Down Expand Up @@ -26818,10 +26818,14 @@ Please pipe the document into a Node stream.\

const getBtnContainer = () => {
const container = document.querySelectorAll('aside>section>section')[0];
return [...container.children].find((div) => {
const btnParent = [...container.children].find((div) => {
const b = div.querySelector('button, .button');
return b && b.outerHTML.replace(/\s/g, '').includes('Download');
const text = b ? b.outerHTML.replace(/\s/g, '') : '';
return text.includes('Download') || text.includes('Print');
});
if (!btnParent)
throw new Error('btn parent not found');
return btnParent;
};
const buildDownloadBtn = () => {
const btn = document.createElement('button');
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "musescore-downloader",
"version": "0.15.11",
"version": "0.15.12",
"description": "download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱",
"main": "dist/main.js",
"repository": {
Expand Down

0 comments on commit 63892a4

Please sign in to comment.