您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
inserts random hair spaces into your toots to fuck with people
当前为
// ==UserScript== // @name Fucking with people // @namespace https://github.com/ashkitten // @version 1.0.1 // @description inserts random hair spaces into your toots to fuck with people // @author ashkitten // @match https://sleeping.town/* // @grant none // ==/UserScript== /* jshint esversion: 6 */ (function() { 'use strict'; // callback function to execute when mutations are observed // we can't use an arrow function here because we need the `this` object new MutationObserver(function(mutations) { // target the composer textarea let textarea = document.querySelector(".composer--textarea .textarea"); // check if it exists if (textarea) { textarea.addEventListener("input", e => { // check if we're inserting a single character if (e.data !== null && e.data.length === 1) { // a 1 in 5 chance works pretty well if (Math.random() < 0.2) { // insert a hair space let cursor = textarea.selectionStart; textarea.value = `${textarea.value.slice(0, cursor)}\u200a${textarea.value.slice(cursor)}`; textarea.setSelectionRange(cursor + 1, cursor + 1); } } }); // disconnect the MutationObserver so it won't get called again this.disconnect(); } }).observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址