PTT Push Count

Count pushes on PTT.cc.

  1. // ==UserScript==
  2. // @name PTT Push Count
  3. // @description Count pushes on PTT.cc.
  4. // @namespace eight04.blogspot.com
  5. // @include https://www.ptt.cc/bbs/*
  6. // @version 0.1.0
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. (function(){
  11.  
  12. var pushes = document.querySelectorAll(".push"),
  13. i;
  14. function createCount(i, base) {
  15. var span = document.createElement("span");
  16. span.className = "push-count " + base.children[0].className;
  17. span.textContent = i;
  18. return span;
  19. }
  20. for (i = 0; i < pushes.length; i++) {
  21. pushes[i].insertBefore(createCount(i + 1, pushes[i]), pushes[i].children[0]);
  22. }
  23. })();

QingJ © 2025

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