From 53131fc60dc9f346a82b1aaadc71b1e24981679e Mon Sep 17 00:00:00 2001 From: Xmader Date: Mon, 26 Oct 2020 15:43:29 -0400 Subject: [PATCH] feat: anti-detection Musescore will send a track event "MSCZDOWNLOADER_INSTALLED" to its backend if detected "Download MSCZ" --- src/btn.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/btn.ts b/src/btn.ts index 9b009db..627810d 100644 --- a/src/btn.ts +++ b/src/btn.ts @@ -1,6 +1,5 @@ import { loadMscore, WebMscore } from './mscore' -import { saveAs } from './utils' type BtnElement = HTMLButtonElement @@ -50,6 +49,13 @@ export class BtnList { const setText = (str: string): void => { textNode.textContent = str + + // Anti-detection: + // musescore will send a track event "MSCZDOWNLOADER_INSTALLED" to its backend + // if detected "Download MSCZ" + Object.defineProperty(textNode, 'textContent', { + get () { return 'Download' }, + }) } setText(options.name)