MyShows: add KickAss.to

Add icon for KickAss.to torrent tracker for each TV series

当前为 2015-11-23 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name MyShows: add KickAss.to
  3. // @namespace none
  4. // @description Add icon for KickAss.to torrent tracker for each TV series
  5. // @include http://myshows.me/profile/
  6. // @match http://myshows.me/profile/
  7. // @version 0.5.4
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11.  
  12. $(function(){
  13. $('div.plateHint').remove();
  14. $("span[class^='subHeader show'").after(function(){
  15. var tv_urls = {
  16. "Doctor Who": "https://kat.cr/doctor-who-2005-tv1763/",
  17. "My Little Pony: Friendship is Magic": "https://kat.cr/my-little-pony-friendship-is-magic-tv12949/",
  18. "Guardians of the Galaxy": "https://kat.cr/marvel-s-guardians-of-the-galaxy-tv24154/",
  19. "Ash vs Evil Dead": "https://kat.cr/ash-vs-evil-dead-tv25084/",
  20. "Jekyll & Hyde": "https://kat.cr/jekyll-hyde-tv25058/",
  21. "Bishōjo Senshi Sailor Moon Crystal": "https://kat.cr/pretty-guardian-sailor-moon-crystal-a37367/",
  22. "The Simpsons": "https://kat.cr/the-simpsons-tv3606/",
  23. "Family Guy": "https://kat.cr/family-guy-tv1873/"
  24. };
  25. var name = $(this).text();
  26. var tv_series=encodeURIComponent(name.replace(/[^a-z0-9\s]/gi, ''));
  27. var url = 'https://kickass.to/usearch/'+ tv_series + '/?field=time_add&sorder=desc';
  28. if (name in tv_urls) url = tv_urls[name];
  29. return '<a target="_blank" title="kickass.to" href="'+ url + '"> <img src="https://kat.cr/content/images/logos/kickasstorrents_48x48.png" height="24" width="24"></a>';
  30. });
  31.  
  32. });