MyShows: add KickAss.to

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

当前为 2015-04-27 提交的版本,查看 最新版本

  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.2
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. window.addEventListener('load', function(){
  12. 'use strict';
  13.  
  14. function add_kickass(){
  15.  
  16. $("span[class^='subHeader show'").after(function(n){
  17. var tv_series=encodeURIComponent($(this).text().replace(/[^a-z0-9\s]/gi, ''));
  18. return '<a target="_blank" title="kickass.to" href="https://kickass.to/usearch/'+ tv_series + '/?field=time_add&sorder=desc"> <img src="https://kastatic.com/images/logos/kickasstorrents_48x48.png" height="24" width="24"></a>';
  19. });
  20. }
  21. add_kickass();
  22. }, false);