v0.17.2
This commit is contained in:
parent
4acff224a8
commit
6e48ef1253
3 changed files with 11 additions and 7 deletions
14
dist/main.js
vendored
14
dist/main.js
vendored
|
@ -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.17.1
|
||||
// @version 0.17.2
|
||||
// @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/*/*
|
||||
|
@ -79,14 +79,18 @@
|
|||
if (typeof document === 'undefined')
|
||||
return {};
|
||||
return new Promise((resolve) => {
|
||||
window.onmouseover = () => {
|
||||
const iframe = document.createElement('iframe');
|
||||
const targetEl = document.documentElement;
|
||||
const eventName = 'onmousemove';
|
||||
const id = Math.random().toString();
|
||||
targetEl[id] = (iframe) => {
|
||||
delete targetEl[id];
|
||||
targetEl.removeAttribute(eventName);
|
||||
iframe.style.display = 'none';
|
||||
document.body.append(iframe);
|
||||
targetEl.append(iframe);
|
||||
const w = iframe.contentWindow;
|
||||
window.onmouseover = null;
|
||||
resolve(w);
|
||||
};
|
||||
targetEl.setAttribute(eventName, `this['${id}'](document.createElement('iframe'))`);
|
||||
});
|
||||
});
|
||||
const getUnsafeWindow = () => {
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "musescore-downloader",
|
||||
"version": "0.17.1",
|
||||
"version": "0.17.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "musescore-downloader",
|
||||
"version": "0.17.1",
|
||||
"version": "0.17.2",
|
||||
"description": "download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱",
|
||||
"main": "dist/main.js",
|
||||
"bin": "dist/cli.js",
|
||||
|
|
Loading…
Reference in a new issue