v0.15.4
This commit is contained in:
parent
59c4e62912
commit
125013d455
|
@ -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.15.3
|
// @version 0.15.4
|
||||||
// @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/*/*
|
||||||
|
@ -26405,8 +26405,8 @@ Please pipe the document into a Node stream.\
|
||||||
get msczIpfsRef() {
|
get msczIpfsRef() {
|
||||||
return `/ipns/${IPNS_KEY}/${this.id}.mscz`;
|
return `/ipns/${IPNS_KEY}/${this.id}.mscz`;
|
||||||
},
|
},
|
||||||
get msczUrl() {
|
get msczCidUrl() {
|
||||||
return `https://ipfs.infura.io:5001/api/v0/cat?arg=${this.msczIpfsRef}`;
|
return `https://ipfs.infura.io:5001/api/v0/dag/resolve?arg=${this.msczIpfsRef}`;
|
||||||
},
|
},
|
||||||
get sheetImgType() {
|
get sheetImgType() {
|
||||||
try {
|
try {
|
||||||
|
@ -26559,22 +26559,26 @@ Please pipe the document into a Node stream.\
|
||||||
})();
|
})();
|
||||||
|
|
||||||
/* eslint-disable no-extend-native */
|
/* eslint-disable no-extend-native */
|
||||||
const AUTH_MODULE_ID = 'UeBv';
|
let AUTH_MODULE_ID;
|
||||||
|
const AUTH_FN = '+3],22,-1044525330)';
|
||||||
const MAGIC_ARG_INDEX = 1;
|
const MAGIC_ARG_INDEX = 1;
|
||||||
/**
|
/**
|
||||||
* I know this is super hacky.
|
* I know this is super hacky.
|
||||||
*/
|
*/
|
||||||
let magic = new Promise((resolve) => {
|
let magic = new Promise((resolve) => {
|
||||||
// todo: hook module by what it does, not what it is called
|
// todo: hook module by what it does, not what it is called
|
||||||
webpackGlobalOverride(AUTH_MODULE_ID, (n, r, t) => {
|
webpackGlobalOverride(ALL, (n, r, t) => {
|
||||||
const fn = n.exports;
|
const fn = n.exports;
|
||||||
n.exports = (...args) => {
|
if (typeof fn === 'function' && fn.toString().includes(AUTH_FN)) {
|
||||||
if (magic instanceof Promise) {
|
AUTH_MODULE_ID = n.i;
|
||||||
magic = args[MAGIC_ARG_INDEX];
|
n.exports = (...args) => {
|
||||||
resolve(magic);
|
if (magic instanceof Promise) {
|
||||||
}
|
magic = args[MAGIC_ARG_INDEX];
|
||||||
return fn(...args);
|
resolve(magic);
|
||||||
};
|
}
|
||||||
|
return fn(...args);
|
||||||
|
};
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const getApiUrl = (type, index) => {
|
const getApiUrl = (type, index) => {
|
||||||
|
@ -26634,9 +26638,11 @@ Please pipe the document into a Node stream.\
|
||||||
let msczBufferP;
|
let msczBufferP;
|
||||||
const fetchMscz = () => __awaiter(void 0, void 0, void 0, function* () {
|
const fetchMscz = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (!msczBufferP) {
|
if (!msczBufferP) {
|
||||||
const url = scoreinfo.msczUrl;
|
const url = scoreinfo.msczCidUrl;
|
||||||
msczBufferP = (() => __awaiter(void 0, void 0, void 0, function* () {
|
msczBufferP = (() => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
const r = yield fetch(url);
|
const r0 = yield fetch(url);
|
||||||
|
const { Cid: { '/': cid } } = yield r0.json();
|
||||||
|
const r = yield fetch(`https://ipfs.infura.io/ipfs/${cid}`);
|
||||||
const data = yield r.arrayBuffer();
|
const data = yield r.arrayBuffer();
|
||||||
return data;
|
return data;
|
||||||
}))();
|
}))();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "musescore-downloader",
|
"name": "musescore-downloader",
|
||||||
"version": "0.15.3",
|
"version": "0.15.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "musescore-downloader",
|
"name": "musescore-downloader",
|
||||||
"version": "0.15.3",
|
"version": "0.15.4",
|
||||||
"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 New Issue