Kufirc torrent preview cover

The list page shows the cover images

  1. // ==UserScript==
  2. // @name Kufirc torrent preview cover
  3. // @name:hu Kufirc torrenten a borítóképek megjelenítése
  4. // @author Kepek
  5. // @description The list page shows the cover images
  6. // @description:hu A lista oldalon megmutatja a borítóképet
  7. // @namespace https://greasyfork.org/hu/users/1159232-kepek
  8. // @license MIT
  9. // @version 0.1
  10. // @include https://kufirc.com/torrents.php*
  11. // @compatible Greasemonkey
  12. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js
  13. // ==/UserScript==
  14.  
  15. // Before use, in Search Center choose categories and click on save button (subtitle: "Tedd alapértelmezetté")
  16.  
  17. // cover image
  18. $('#torrent_table td > a').each(function(index, value) {
  19.  
  20. var id = $(value).attr("href");
  21.  
  22. id = id.replace("/torrents.php?id=", "");
  23.  
  24. if ( typeof unsafeWindow[ "overlay" + id ] !== 'undefined' ) {
  25.  
  26. var popup = $.parseHTML( unsafeWindow[ "overlay" + id ] );
  27.  
  28. var src = $( 'img', popup ).attr("src");
  29.  
  30. $(value).append( '<div><img src="' + src + '" style="max-width: 300px;"></div>' );
  31.  
  32.  
  33. }
  34. });