Create history list

Creates a list of your download history, can be output to a TXT.

当前为 2016-05-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Create history list
  3. // @namespace PXgamer
  4. // @version 0.1
  5. // @description Creates a list of your download history, can be output to a TXT.
  6. // @author PXgamer
  7. // @match *kat.cr/account/history*
  8. // @grant GM_setValue
  9. // @grant GM_getValue
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. var all = { titles: [], magnets: [], torrents: [] };
  16.  
  17. $('a.cellMainLink[href$=".html"]').each(function() {
  18. all.titles.push($(this).html());
  19. });
  20. $('a[title="Torrent magnet link"]').each(function() {
  21. all.magnets.push($(this).attr('href'));
  22. });
  23. $('a[title="Download torrent file"]').each(function() {
  24. all.torrents.push($(this).attr('href'));
  25. });
  26. })();