Skip to content

Commit

Permalink
v0.12.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Nov 10, 2020
1 parent 1cfb417 commit df99718
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 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.12.4
// @version 0.12.5
// @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 @@ -26815,21 +26815,6 @@ Please pipe the document into a Node stream.\
const txt = x.textContent;
return txt.includes('Download') || txt.includes('Print');
});
// Anti-detection:
// musescore will send a track event "MSCZDOWNLOADER_INSTALLED" to its backend
// if detected "Download MSCZ"
['textContent', 'innerHTML'].forEach((_property) => {
const _set = textNode['__lookupSetter__'](_property);
Object.defineProperty(textNode, _property, {
set(v) { _set.call(textNode, v); },
get: () => {
// first time only
const t = this.antiDetectionText;
this.antiDetectionText = ' ';
return t;
},
});
});
const setText = (str) => {
textNode.textContent = str;
};
Expand Down Expand Up @@ -26865,7 +26850,10 @@ Please pipe the document into a Node stream.\
commit() {
let el = this._commit();
const observer = new MutationObserver(() => {
// check if the buttons are still in document when dom updates
if (!document.contains(el)) {
// re-commit
// performance issue?
el = this._commit();
}
});
Expand Down

0 comments on commit df99718

Please sign in to comment.