Taming.io Uncensor Chat

Uncensors selected words by the user.

当前为 2023-09-05 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Taming.io Uncensor Chat
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.5
  5. // @description Uncensors selected words by the user.
  6. // @author You
  7. // @match https://taming.io/
  8. // @match https://biologyclass.school/
  9. // @match https://trymath.org/
  10. // @match https://school-homework.com/
  11. // @match https://tamming.io/
  12. // @match https://mathcool.glitch.me/
  13. // @icon https://taming.io/img/creature/boss-grim-reaper-scythe-skin1.png
  14. // @grant none
  15. // ==/UserScript==
  16.  
  17. let censoredWords = prompt("Bypass List: (separated by spaces)", "") || "".split(" ");
  18.  
  19. const selector = document.querySelector("input");
  20.  
  21. const character = "‎";
  22.  
  23. const resetKeybind = document.onkeydown = (evt) => {
  24. evt = evt || window.event;
  25. if (evt.keyCode == 27) {
  26. censoredWords = prompt("Bypass List: (separated by spaces)", censoredWords.join(" ")).split(" ");
  27. }
  28. };
  29.  
  30. const indexes = (string, search) => {
  31. return [...string.matchAll(new RegExp(search, "gi"))].map((a) => a.index);
  32. };
  33.  
  34. const inject = (string, index) => {
  35. index++;
  36. return string.slice(0, index) + character + string.slice(index);
  37. }
  38.  
  39. const onInput = () => {
  40. if (censoredWords[0] == "" && censoredWords.length == 1) return;
  41. selector.value = selector.value.replace(/[\u200B-\u200D\uFEFF]/g, '');
  42. censoredWords.forEach((i) => {
  43. if (selector.value.toLowerCase().includes(i)) {
  44. let indexList = indexes(selector.value, i);
  45. let indexIncrement = 0;
  46.  
  47. indexList.forEach((j) => {
  48. indexList[indexList.indexOf(j)] += indexIncrement;
  49. indexIncrement += 2;
  50. });
  51.  
  52. indexList.forEach((k) => {
  53. selector.value = inject(selector.value, k);
  54. selector.value = inject(selector.value, k + 2);
  55. });
  56.  
  57. }
  58. });
  59. };
  60.  
  61. selector.oninput = onInput;

QingJ © 2025

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