v0.12.2
This commit is contained in:
parent
914c770ea4
commit
9cc22dc181
3 changed files with 14 additions and 9 deletions
7
dist/main.js
vendored
7
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.12.1
|
// @version 0.12.2
|
||||||
// @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/*/*
|
||||||
|
@ -26445,6 +26445,7 @@ Please pipe the document into a Node stream.\
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||||
|
const CHUNK_PUSH_FN = 'function a(a){';
|
||||||
const moduleLookup = (id, globalWebpackJson) => {
|
const moduleLookup = (id, globalWebpackJson) => {
|
||||||
const pack = globalWebpackJson.find(x => x[1][id]);
|
const pack = globalWebpackJson.find(x => x[1][id]);
|
||||||
return pack[1][id];
|
return pack[1][id];
|
||||||
|
@ -26504,16 +26505,20 @@ Please pipe the document into a Node stream.\
|
||||||
}
|
}
|
||||||
// hook `webpackJsonpmusescore.push` as soon as `webpackJsonpmusescore` is available
|
// hook `webpackJsonpmusescore.push` as soon as `webpackJsonpmusescore` is available
|
||||||
let jsonp;
|
let jsonp;
|
||||||
|
let hooked = false;
|
||||||
Object.defineProperty(window, 'webpackJsonpmusescore', {
|
Object.defineProperty(window, 'webpackJsonpmusescore', {
|
||||||
get() { return jsonp; },
|
get() { return jsonp; },
|
||||||
set(v) {
|
set(v) {
|
||||||
jsonp = v;
|
jsonp = v;
|
||||||
|
if (!hooked && v.push.toString().includes(CHUNK_PUSH_FN)) {
|
||||||
|
hooked = true;
|
||||||
hookNative(v, 'push', (_fn) => {
|
hookNative(v, 'push', (_fn) => {
|
||||||
return function (pack) {
|
return function (pack) {
|
||||||
applyOverride(pack);
|
applyOverride(pack);
|
||||||
return _fn.call(this, pack);
|
return _fn.call(this, pack);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// set overrides
|
// set overrides
|
||||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "musescore-downloader",
|
"name": "musescore-downloader",
|
||||||
"version": "0.12.1",
|
"version": "0.12.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "musescore-downloader",
|
"name": "musescore-downloader",
|
||||||
"version": "0.12.1",
|
"version": "0.12.2",
|
||||||
"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",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in a new issue