emerald-dl

Emerald article viewer/dowloader

  1. // ==UserScript==
  2. // @name emerald-dl
  3. // @namespace ogun@cock.li
  4. // @version 0.1
  5. // @description Emerald article viewer/dowloader
  6. // @author Ogun
  7. // @match https://www.emerald.com/insight/content/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. const url = window.location.href;
  14. var patt = /\d.+/;
  15. const doi = url.match(patt);
  16. const auth = document.getElementsByClassName("intent_explore")[0];
  17. auth.dataset.target = "#";
  18. auth.setAttribute('data-toggl', '#');
  19. auth.innerHTML='DOWNLOAD';
  20. auth.href="https://sci-hub.tw/" +doi;
  21. // Your code here...
  22. })();