IMSLP Instant Download

Free the Public Domain music library

当前为 2018-12-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name IMSLP Instant Download
  3. // @namespace https://imslp.org/
  4. // @version 0.1
  5. // @description Free the Public Domain music library
  6. // @match https://imslp.org/wiki/*
  7. // @copyright 2018, Isaac Khor
  8. // ==/UserScript==
  9.  
  10. // Check for download link to skip the wait
  11. var dllink = document.querySelector("span[id$='sm_dl_wait']");
  12. if(dllink) window.location.replace(dllink.getAttribute('data-id'));
  13.  
  14. // Check for the 'I accept the disclaimer' link and auto redirect
  15. var disl = document.querySelector("a[href^='/wiki/Special:IMSLPDisclaimerAccept/']");
  16. if(disl) window.location.replace(disl.href);