bangumi 收藏吐槽字数统计

bangumi 收藏吐槽字数统计,显示目前输入字数,防止字数超出。

  1. // ==UserScript==
  2. // @name bangumi 收藏吐槽字数统计
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.01
  5. // @description bangumi 收藏吐槽字数统计,显示目前输入字数,防止字数超出。
  6. // @author 鈴宮華緋
  7. // @include /https?:\/\/(bgm\.tv|bangumi\.tv|chii\.in)\/subject\/.*/
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. let p = $("<p>");
  12. $("#comment").before(p);
  13. $("#comment").on("input propertychange", function() {
  14. showtext();
  15. });
  16. showtext();
  17. function showtext() {
  18. let length = $("#comment").val().length;
  19. let text = length + "/200";
  20. p.text(text);
  21. p.css({
  22. "color" : "blue",
  23. "text-size" : "15px"
  24. });
  25. if (length > 200) {
  26. p.css({
  27. color : "red"
  28. });
  29. } else {
  30. p.css({
  31. color : "blue"
  32. });
  33. }
  34. }
  35. })();

QingJ © 2025

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