您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Change your name, at least temporarily!
// ==UserScript== // @name Picarto Username Changer // @namespace Wolvan_PicartoTV_Username_Modifier // @version 1.0 // @description Change your name, at least temporarily! // @author Wolvan // @match *://*.picarto.tv/* // @grant none // ==/UserScript== // Get Picarto's jQuery instance, no need to polute it with our own var $ = window.jQuery; // A function to inject CSS into the site function changeName(name) { $.post("/process/channel", { setusername: name }).done(function (resp) { switch (resp) { case "ok": location.reload(); break; case "userNameRegEx": window.displayNotificationMsg(10); break; case "userNameExists": window.displayNotificationMsg(13); break; case "userNameTooLong": window.displayNotificationMsg(11); break; } }); } $("body").keydown(function(e) { if (e.which === 81 && e.ctrlKey) { var name = prompt("Please choose a username"); if (name) changeName(name); } });