rules_to_view.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
  6. <meta http-equiv="Cache-Control" content="no-siteapp;no-transform">
  7. <meta name="applicable-device" content="pc,mobile">
  8. <meta name="viewport" content="width=device-width, initial-scale=1">
  9. <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  10. <title>查看已缓存规则列表-{{rules.count}}</title>
  11. <script src="/static/js/jquery.min.js"></script>
  12. <script src="/static/js/grey.js"></script>
  13. </head>
  14. <style>
  15. .red {
  16. color:red;
  17. font-weight: bold
  18. }
  19. .yellow {
  20. color:yellow;
  21. font-weight: bold
  22. }
  23. .refresh{
  24. }
  25. </style>
  26. <body>
  27. <script>
  28. $(document).ready(function(){
  29. $(".refresh").click(function(){
  30. // location.reload();
  31. let rule = this.innerText.trim();
  32. location.href = '/plugin/'+rule+'.js';
  33. });
  34. $(".cls").click(function(){
  35. // location.reload();
  36. let cls = this.innerText.trim();
  37. location.href = '/cls/get/'+cls;
  38. });
  39. });
  40. </script>
  41. <h1>缓存规则列表-{{rules.count}}</h1>
  42. {% if rules.count < 1 %}
  43. <h3>暂无已缓存的规则</h3>
  44. {% endif %}
  45. {% for rule in rules.list %}
  46. {% if rule.name|length > 2 %}
  47. <!-- | 为过滤条件 -->
  48. <li class="red">
  49. <!-- <a class="refresh" href="/clear?rule={{rule}}" target="_blank">{{ rule }}</a>-->
  50. <a class="refresh" href="javascript:void(0);">{{ rule.name }}</a>
  51. </li>
  52. {% else %}
  53. <!-- 如果是if条件,最后必须要有else,否则就会报错 -->
  54. <li class="yellow">
  55. <a class="refresh" href="javascript:void(0);">{{ rule.name }}</a>
  56. </li>
  57. {% endif %}
  58. <!-- if条件必须有endif,否则会报错 -->
  59. {% endfor %}
  60. <h1>缓存分类列表-{{ classes|length }}</h1>
  61. {% if classes|length < 1 %}
  62. <h3>暂无已缓存的分类</h3>
  63. {% endif %}
  64. {% for cls in classes %}
  65. {% if cls|length > 2 %}
  66. <li class="red">
  67. <a class="cls" href="javascript:void(0);">{{ cls }}</a>
  68. </li>
  69. {% else %}
  70. <li class="yellow">
  71. <a class="cls" href="javascript:void(0);">{{ cls }}</a>
  72. </li>
  73. {% endif %}
  74. {% endfor %}
  75. </body>
  76. </html>