Hide FileSick

Filters and hides FileSick's pointless uploads on The Pirate Bay with the ability to toggle their visibility. Filtering is bypassed when a search term includes "FileSick".

  1. // ==UserScript==
  2. // @name Hide FileSick
  3. // @description Filters and hides FileSick's pointless uploads on The Pirate Bay with the ability to toggle their visibility. Filtering is bypassed when a search term includes "FileSick".
  4. // @version 0.2.3
  5. // @author VICEGIRLS
  6. // @copyright 2014 - CC BY-NC-SA 4.0
  7. // @namespace vg.filters.TPB
  8. // @include http://thepiratebay.*/search/*/*/3*
  9. // @include https://thepiratebay.*/search/*/*/3*
  10. // @include http://thepiratebay.*/browse/3*
  11. // @include https://thepiratebay.*/browse/3*
  12. // @exclude http://thepiratebay.*/search/*filesick*
  13. // @exclude https://thepiratebay.*/search/*filesick*
  14. // @require https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
  15. // @run-at document-end
  16. // ==/UserScript==
  17.  
  18. // Main function
  19. function hideEvent() {
  20. // Extending jQuery for a text toggling function with external target
  21. // Basic function method courtesy user Nate on StackOverflow (goo.gl/Z468fI)
  22. $.fn.extend({
  23. toggleText: function (target, a, b){
  24. var isClicked = false;
  25. // var that = this;
  26. if(target!=this) {
  27. var that = $(target);
  28. } else {
  29. var that = this;
  30. }
  31. this.click(function (){
  32. if (isClicked) { that.text(a); isClicked = false; }
  33. else { that.text(b); isClicked = true; }
  34. });
  35. return this;
  36. }
  37. });
  38. // Insert custom styles
  39. $("<link/>", {
  40. rel: "stylesheet",
  41. type: "text/css",
  42. href: "data:text/css,"+
  43. ".toggleContainer { display: block; min-height: 15px; min-width: 60px; padding: 2px 5px 2px 5px; background: transparent; color: #78604F; font-size: 10px; " +
  44. "position: relative; top: -20px; right: -5px; float: right; opacity: 0.3; }" +
  45. ".toggleContainer:hover { cursor: pointer; opacity: 1.0; }" +
  46. ".hideToggle { font-weight: 400; letter-spacing: 0.5px; }" +
  47. ".toggleActive { background: #FF0000; color: #FFFFFF; opacity: 1.0; }"
  48. }).appendTo("head");
  49. // Find rows for heathen uploads and create object
  50. var $filteredRows = $("tr").has("a[href*='FileSick']" || "a[href*='FileSick2']");
  51. // Hide table rows that include links to heathen user
  52. $filteredRows.toggle();
  53. // Clear the h2 element to properly display the toggle button
  54. $("h2").css("clear: both;");
  55. // Add link to toggle visibility, a feature with questionable utility
  56. $("h2").append('<div class="toggleContainer"><span class="hideToggle">Show FileSick</span></div>');
  57. // Toggle row visibility when hideToggle element is clicked
  58. $(".toggleContainer").click(function() {
  59. $filteredRows.toggle();
  60. $(".toggleContainer").toggleClass("toggleActive");
  61. });
  62. // Change text of hideToggle element dependent on toggle state
  63. $(".toggleContainer").toggleText(".hideToggle", "Show FileSick", "Hide FileSick");
  64. }
  65.  
  66. // Run main function
  67. hideEvent();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址