您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically injects a zero-width space into the Taming.io chat to uncensor censored words.
当前为
- // ==UserScript==
- // @name Taming.io ZWSP Injector 2.0
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Automatically injects a zero-width space into the Taming.io chat to uncensor censored words.
- // @author You
- // @match https://taming.io/
- // @icon https://taming.io/img/creature/boss-seahorse-head.png
- // @grant none
- // ==/UserScript==
- let censoredWords = prompt("Bypass List: (separated by spaces)", "").split(" ");
- const selector = document.querySelector("input");
- const resetKeybind = document.onkeydown = (evt) => {
- evt = evt || window.event;
- if (evt.keyCode == 27) {
- censoredWords = prompt("Bypass List: (separated by spaces)", censoredWords.join(" ")).split(" ");
- }
- };
- const indexes = (string, search) => {
- return [...string.matchAll(new RegExp(search, "gi"))].map((a) => a.index);
- };
- const inject = (string, index) => {
- index++;
- return string.slice(0, index) + "" + string.slice(index);
- }
- const onInput = () => {
- if (censoredWords[0] == "" && censoredWords.length == 1) return;
- selector.value = selector.value.replace(/[\u200B-\u200D\uFEFF]/g, '');
- censoredWords.forEach((i) => {
- if (selector.value.toLowerCase().includes(i)) {
- let indexList = indexes(selector.value, i);
- let indexIncrement = 0;
- indexList.forEach((j) => {
- indexList[indexList.indexOf(j)] += indexIncrement;
- indexIncrement += 2;
- });
- indexList.forEach((k) => {
- selector.value = inject(selector.value, k);
- selector.value = inject(selector.value, k + 2);
- });
- }
- });
- };
- selector.oninput = onInput;
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址