您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
TL;DR
// ==UserScript== // @name RPGEN - Read out Sasayaki-Chat // @namespace https://tampermonkey.net/ // @version 1.0 // @description TL;DR // @author https://greasyfork.org/ja/users/705684 // @match https://rpgen.site/dq/?map=* // @icon https://www.google.com/s2/favicons?sz=64&domain=rpgen.site // @license MIT // @grant none // @require https://update.greasyfork.org/scripts/515720/1477456/util.js // ==/UserScript== (() => { const removeNonVerbal = str => str .replace(/\[.+?\]/g, ' Urawaza ') .replace(/h?ttps?:\/\/.+$/g, ' URL '); const id = setInterval(() => { if (window.dqSock && window.dqSock.socket) { clearInterval(id); window.dqSock.socket.on("uNC_s", (async function({g, t}) { const random = await window.pseudoRandomBy(g); const uttr = new SpeechSynthesisUtterance(removeNonVerbal(t)); const voices = window.speechSynthesis.getVoices().filter(v => v.lang === 'ja-JP'); uttr.voice = voices[voices.length * random | 0]; window.speechSynthesis.speak(uttr); })); } }, 500); })();