Simple Steam Workshop Downloader

Downloads Steam Workshop items using steamworkshop.download

当前为 2022-11-13 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Simple Steam Workshop Downloader
  3. // @namespace http://github.com/Satrpx/
  4. // @version 1.0
  5. // @description Downloads Steam Workshop items using steamworkshop.download
  6. // @author Satrpx
  7. // @match *://steamcommunity.com/workshop/filedetails/?id=*
  8. // @match *://steamcommunity.com/sharedfiles/filedetails/?id=*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=steamcommunity.com
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. const header=document.querySelector( '.workshopItemDetailsHeader' );
  15. const a=document.createElement('a');
  16. a.innerText='Download';
  17. var ct=window.location.href.search('&');
  18. if(ct==-1) a.href='http://steamworkshop.download/download/view/'+window.location.href.substr(window.location.href.search('id=')+3);
  19. else a.href='http://steamworkshop.download/download/view/'+window.location.href.substring(window.location.href.search('id=')+3,ct);
  20. a.target='_blank';
  21. a.className='btn_green_white_innerfade btn_border_2px btn_medium';
  22. a.style.padding='10px';
  23. header.appendChild(a);