Xmader / musescore-downloader

⚠️ This repo has moved to https://github.com/LibreScore/dl-librescore ⚠️ | Download sheet music (MSCZ, PDF, MusicXML, MIDI, MP3, download individual parts as PDF) from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱

Home Page:https://github.com/LibreScore/dl-librescore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

it says "Disable Tampermonkey to access the website"

fadfdsaadfd opened this issue · comments

I hate musescore..

There is an alternative method, see CLI Usage

I had the same problem as you but I played around with Tampermonkey Beta and figured out a simple solution to make it work.
Disable Tampermonkey before accessing the page with the sheet music you want, then enable Tampermonkey and CLICK REFRESH.
Download your file then disable Tampermonkey and CLICK REFRESH before leaving page to get another sheet, repeat the same steps for each file.
Works for me so far.... good luck.

commented

CLI Usage
(recommended, more bulletproof)

  1. Install Node.js LTS (https://nodejs.org/)
  2. Open a command line terminal or command prompt
  3. Type npx msdl, enter
    (npx msdl will always run the latest version)
    Follow the instructions

https://github.com/Xmader/musescore-downloader#cli-usage

commented

Hi,

I'm unfamiliar with the project structure, however I've found a workaround for this.

Right at the start of the script in Tampermonkey, just after the comment-y bits at the start, I've added the following JS code:

var script = document.createElement("script");
script.textContent = `class _ErrorReplacement{
    constructor(){
        this.stack = "not tamper";
    }
}

Error = _ErrorReplacement;
`;

(document.head||document.documentElement).appendChild(script);

With this tweak I'm no longer seeing the Tampermonkey error. Sometimes the download buttons don't show, but clicking the Tampermonkey extension icon and then choosing Download MSCZ etc all still work.

Basically I noticed that MuseScore is raising a new error and then checking the stack to see if it contains "userscript.html", and if it does then the message gets shown. Here I'm overriding the default error with my own class and setting the stack to a string that is definitely not "userscript.html" to bypass this.