Skip to content

Commit bef85c5

Browse files
committed
v0.23.12
1 parent b68ff38 commit bef85c5

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

dist/main.js

+8-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// @supportURL https://github.com/Xmader/musescore-downloader/issues
66
// @updateURL https://msdl.librescore.org/install.user.js
77
// @downloadURL https://msdl.librescore.org/install.user.js
8-
// @version 0.23.11
8+
// @version 0.23.12
99
// @description download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱
1010
// @author Xmader
1111
// @match https://musescore.com/*/*
@@ -54,23 +54,22 @@
5454

5555
// script loader
5656
new Promise(resolve => {
57-
const id = '' + Math.random();
58-
w[id] = resolve;
59-
60-
const stackN = 9
57+
const d = new Image()
58+
document.body.prepend(d)
59+
resolve(d)
60+
}).then(d => {
61+
const stackN = 10
6162
let loaderIntro = ''
6263
for (let i = 0; i < stackN; i++) {
6364
loaderIntro += `(function ${getRandL()}(){`
6465
}
6566
const loaderOutro = '})()'.repeat(stackN)
6667
const mockUrl = "https://c.amazon-adsystem.com/aax2/apstag.js"
6768

68-
setTimeout(`${loaderIntro}const d=new Image();window['${id}'](d);delete window['${id}'];document.body.prepend(d)${loaderOutro}//# sourceURL=${mockUrl}`)
69-
}).then(d => {
7069
d.style.display = 'none';
7170
d.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
7271
d.once = false;
73-
d.setAttribute('onload', `if(this.once)return;this.once=true;this.remove();const GM=window['${gmId}'];delete window['${gmId}'];(` + function a () {
72+
d.setAttribute('onload', `const self=this;${loaderIntro}if(self.once)return;self.once=true;self.remove();const GM=window['${gmId}'];delete window['${gmId}'];(` + function a () {
7473
/** script code here */
7574

7675

@@ -27514,6 +27513,6 @@ Please pipe the document into a Node stream.\
2751427513
// eslint-disable-next-line @typescript-eslint/no-floating-promises
2751527514
waitForSheetLoaded().then(main);
2751627515

27517-
}.toString() + ')()')})
27516+
}.toString() + `)()${loaderOutro}//# sourceURL=${mockUrl}`)})
2751827517

2751927518
}());

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "musescore-downloader",
3-
"version": "0.23.11",
3+
"version": "0.23.12",
44
"description": "download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱",
55
"main": "dist/main.js",
66
"bin": "dist/cli.js",

0 commit comments

Comments
 (0)