您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
你打字带空格
// ==UserScript== // @name echou // @namespace http://tampermonkey.net/ // @version 0.1 // @description 你打字带空格 // @author relic // @match https://bbs.sgamer.com/forum.php?mod=post* // @grant none // ==/UserScript== (function() { 'use strict'; window.replace = function (text){ text=text.replace(/\s*/g,""); var txt_split=text.split(''); var arr = new Array(); for(var index=0 ; index < txt_split.length;index++){ arr.push(txt_split[index]); var reg=new RegExp("[\\u4E00-\\u9FFF]+","g"); if(reg.test(txt_split[index])){ arr.push(' '); } } var txt_new=arr.join(''); return txt_new; } var z = document.getElementsByClassName("z"); z[2].innerHTML+= " <a href='javascript:void(0);' onclick='echou()' > 恶臭</a>"; window.echou=function () { var title = document.getElementById("subject"); title.value=window.replace(title.value); var msg = document.getElementById('e_iframe').contentWindow.document.getElementsByTagName('body')[0]; var str = msg.innerHTML; //str = str.replace(/<\/?[^>]*>/g,''); str=str.replace(/ /ig,''); msg.innerHTML= window.replace(str); } })();