您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Private dialog in the chat (Shift + LMB) on nickname of the user in the messages block
// ==UserScript== // @name KG_PrivateChatLink // @namespace klavogonki // @include http://klavogonki.ru/gamelist/ // @include https://klavogonki.ru/g/* // @author NoNe // @description Private dialog in the chat (Shift + LMB) on nickname of the user in the messages block // @version 0.1 // ==/UserScript== (function () { var matches = document.body.msMatchesSelector ? 'msMatchesSelector' : 'matches'; window.addEventListener('click', function (event) { if (!event.shiftKey) { return; } var target = event.target; if (!target[matches]('.chat .username > span')) { return; } var inputs = document.querySelectorAll('.chat input.text'); [].forEach.call(inputs, function (input) { // Check the input is visible: if (input.offsetParent) { input.value = '<' + target.textContent + '>'; input.focus(); } }); event.stopPropagation(); }, true); })();