Skip to content

Commit

Permalink
v0.17.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Nov 26, 2020
1 parent 4acff22 commit 6e48ef1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/*/*
Expand Down Expand Up @@ -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 = () => {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 6e48ef1

Please sign in to comment.