v0.23.7
This commit is contained in:
parent
eda8342a3d
commit
1e3e2d7581
3 changed files with 15 additions and 6 deletions
17
dist/main.js
vendored
17
dist/main.js
vendored
|
@ -5,7 +5,7 @@
|
||||||
// @supportURL https://github.com/Xmader/musescore-downloader/issues
|
// @supportURL https://github.com/Xmader/musescore-downloader/issues
|
||||||
// @updateURL https://msdl.librescore.org/install.user.js
|
// @updateURL https://msdl.librescore.org/install.user.js
|
||||||
// @downloadURL https://msdl.librescore.org/install.user.js
|
// @downloadURL https://msdl.librescore.org/install.user.js
|
||||||
// @version 0.23.6
|
// @version 0.23.7
|
||||||
// @description download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱
|
// @description download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱
|
||||||
// @author Xmader
|
// @author Xmader
|
||||||
// @match https://musescore.com/*/*
|
// @match https://musescore.com/*/*
|
||||||
|
@ -26633,7 +26633,7 @@ Please pipe the document into a Node stream.\
|
||||||
// force to retrieve the MAGIC
|
// force to retrieve the MAGIC
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'midi': {
|
case 'midi': {
|
||||||
const el = document.querySelectorAll('.uPjTb > button')[3];
|
const el = document.querySelector('button[hasaccess]');
|
||||||
el.click();
|
el.click();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -27351,13 +27351,22 @@ Please pipe the document into a Node stream.\
|
||||||
super();
|
super();
|
||||||
this.document = document;
|
this.document = document;
|
||||||
}
|
}
|
||||||
|
get sheet0Img() {
|
||||||
|
return this.document.querySelector('img[src*=score_]');
|
||||||
|
}
|
||||||
get pageCount() {
|
get pageCount() {
|
||||||
return this.document.querySelectorAll('._2uWw4').length;
|
var _a;
|
||||||
|
const sheet0Div = (_a = this.sheet0Img) === null || _a === void 0 ? void 0 : _a.parentElement;
|
||||||
|
if (!sheet0Div) {
|
||||||
|
throw new Error('no sheet images found');
|
||||||
|
}
|
||||||
|
return this.document.getElementsByClassName(sheet0Div.className).length;
|
||||||
}
|
}
|
||||||
get thumbnailUrl() {
|
get thumbnailUrl() {
|
||||||
|
var _a;
|
||||||
// url to the image of the first page
|
// url to the image of the first page
|
||||||
const el = this.document.querySelector('link[as=image]');
|
const el = this.document.querySelector('link[as=image]');
|
||||||
const url = el.href;
|
const url = ((el === null || el === void 0 ? void 0 : el.href) || ((_a = this.sheet0Img) === null || _a === void 0 ? void 0 : _a.src));
|
||||||
return url.split('@')[0];
|
return url.split('@')[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "musescore-downloader",
|
"name": "musescore-downloader",
|
||||||
"version": "0.23.6",
|
"version": "0.23.7",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "musescore-downloader",
|
"name": "musescore-downloader",
|
||||||
"version": "0.23.6",
|
"version": "0.23.7",
|
||||||
"description": "download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱",
|
"description": "download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
"bin": "dist/cli.js",
|
"bin": "dist/cli.js",
|
||||||
|
|
Loading…
Reference in a new issue