🏠 Home 

Filelist filter

Custom Filelist filter for TV series and number of downloads


Install this script?
  1. // ==UserScript==
  2. // @name Filelist filter
  3. // @description Custom Filelist filter for TV series and number of downloads
  4. // @include https://filelist.io/*
  5. // @version 0.0.1.20230807194255
  6. // @namespace https://greasyfork.org/users/162242
  7. // ==/UserScript==
  8. var wordListing = [
  9. "Fear.the.Walking.Dead.S",
  10. "Foundation",
  11. "Halo",
  12. "House of the Dragon",
  13. "I.Am.Groot",
  14. "Invasion",
  15. "Loki",
  16. "Raised.by.Wolves",
  17. "Severance",
  18. "South.Park",
  19. "The.Boys",
  20. "The.Last.of.Us",
  21. "The.Lord.of.the.Rings.The.Rings.of.Power",
  22. "The.Sandman",
  23. "The.Terminal.List",
  24. "The.Walking.Dead",
  25. "The.Witcher.S"
  26. ];
  27. var selection1 = 500;
  28. var selection2 = 999;
  29. var selection3 = 1999;
  30. var selectionColor1 = "#003366";
  31. var selectionColor2 = "#002900";
  32. var selectionColor3 = "#6B0000";
  33. var ul = document.getElementById("nav").children[0];
  34. var li = document.createElement('li');
  35. li.className = "fleft";
  36. ul.appendChild(li);
  37. var a = document.createElement('a');
  38. var linkText = document.createTextNode("Activate");
  39. a.appendChild(linkText);
  40. a.title = "Activate the filter";
  41. a.href = "javascript:void(0)";
  42. a.setAttribute("id", "CustomButton");
  43. a.addEventListener("click", myScript);
  44. li.appendChild(a);
  45. function myScript() {
  46. var torrentrow = document.getElementsByClassName("torrentrow");
  47. if(document.getElementById("CustomButton").innerHTML == "Activate") {
  48. document.getElementById("CustomButton").innerHTML = "Deactivate";
  49. for (i = 0; i < torrentrow.length; i++) {
  50. if(typeof torrentrow[i].children !== 'undefined'){
  51. var title = torrentrow[i].children[1].children[0].children[0].innerText;
  52. var snatched = torrentrow[i].children[7].children[0].children[0].textContent;
  53. snatched = snatched.replace(",", "");
  54. snatched = snatched.replace("times", "");
  55. snatched = parseInt(snatched);
  56. for (k = 0; k < wordListing.length; k++) {
  57. if (title.match(wordListing[k])) {
  58. torrentrow[i].children[1].children[0].children[0].style.textDecoration = "underline overline";
  59. torrentrow[i].children[1].children[0].children[0].style.color = "#33CCFF";
  60. }
  61. }
  62. if (snatched > selection3) {
  63. torrentrow[i].style.backgroundColor = selectionColor3;
  64. } else if (snatched > selection2) {
  65. torrentrow[i].style.backgroundColor = selectionColor2;
  66. } else if (snatched > selection1) {
  67. torrentrow[i].style.backgroundColor = selectionColor1;
  68. }
  69. }
  70. }
  71. } else {
  72. document.getElementById("CustomButton").innerHTML = "Activate";
  73. for (j = 0; j < torrentrow.length; j++) {
  74. torrentrow[j].children[1].children[0].children[0].style.textDecoration = "none";
  75. torrentrow[j].removeAttribute("style");
  76. torrentrow[j].children[1].children[0].children[0].removeAttribute("style");
  77. }
  78. }
  79. }
  80. document.addEventListener('DOMContentLoaded',myScript());