Proxer-Collapsable-Lists

Dieses Script bringt die zusammenklappbaren Anime-/Mangalisten aus dem Mobile Client ins Webinterface

  1. // ==UserScript==
  2. // @name Proxer-Collapsable-Lists
  3. // @namespace
  4. // @version 0.7
  5. // @description Dieses Script bringt die zusammenklappbaren Anime-/Mangalisten aus dem Mobile Client ins Webinterface
  6. // @author TheExoduser
  7. // @match *://*.proxer.me/ucp?s=*
  8. // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
  9. // @run-at document-end
  10. // ==/UserScript==
  11.  
  12. $(document).ready(function() {
  13. var checkTrue = false;
  14.  
  15. // Check if correct page
  16. if (window.location.href.indexOf('anime') > -1 || window.location.href.indexOf('manga') > -1) {
  17. checkTrue = true;
  18. }
  19. if (window.location.href.indexOf('ucp') === -1 || checkTrue === false || window.location.href.indexOf('forum') > -1) {
  20. return;
  21. }
  22.  
  23. // Move first row to thead
  24. $("table#box-table-a").each(function(index) {
  25. var rowFirst = $(this).find("tr:first");
  26.  
  27. $(this).find("tr:first").remove();
  28. $(this).prepend("<thead style=\"cursor:pointer;\">" + $(rowFirst).html() + "</thead>");
  29. });
  30.  
  31. // Add +/- toggle icon to table head
  32. $("table#box-table-a:eq(1)").find("tr:first").html($("table#box-table-a:eq(1)").find("tr:first").html().replace("</th>","<span style=\"float:right;\">-</span></th>"));
  33. $("table#box-table-a").not(":eq(1)").each(function(index) {
  34. $(this).find("tr:first").html($(this).find("tr:first").html().replace("</th>","<span style=\"float:right;\">+</span></th>"));
  35. });
  36.  
  37. // Hide all tbodys exept of the currently watching list
  38. $("table#box-table-a").not(":eq(1)").find('tbody').toggle();
  39.  
  40. // Add events to toggle the tbodys on click
  41. $("th").click(function() {
  42. if ($(this).html().indexOf("+") >= 0) {
  43. $(this).html($(this).html().replace("+", "-"));
  44. } else {
  45. $(this).html($(this).html().replace("-", "+"));
  46. }
  47.  
  48. $(this).closest('table').find('tbody').toggle("slow");
  49. });
  50.  
  51. // Echo a loaded message
  52. console.warn("Proxer-Collapsable-Lists Userscript successfully loaded!");
  53. });

QingJ © 2025

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