Huntereb

Roms43 Downloader Userscript

Dec 30th, 2015
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Roms43 Downloader
  3. // @namespace    http://roms43.com/
  4. // @version      1.0
  5. // @description  Generates direct download links on roms43
  6. // @author       Huntereb
  7. // @match        *roms43.com/download/*
  8. // @grant        none
  9. // ==/UserScript==
  10. /* jshint -W097 */
  11. 'use strict';
  12.  
  13. var dlbut = document.createElement('button');
  14. dlbut.innerHTML = 'Download';
  15. dlbut.setAttribute('type', 'button');
  16. dlbut.setAttribute('onclick', "window.open(tr_download_url);");
  17. dlbut.name = 'dlbut';
  18.  
  19. var trash = document.getElementsByClassName('btn btn-danger btn-lg margin download_link');
  20. trash[0].parentNode.removeChild(trash[0]);
  21.  
  22. document.getElementsByClassName('media text-center margin20')[0].appendChild(dlbut);
Add Comment
Please, Sign In to add comment