NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Команды в чате Игровой // @namespace https://catwar.su/cat209467 // @version 1 // @description Добавляет в чат Игровой команду /активность, которая при отправке показывает активность текущего персонажа // @author Fredo14 // @copyright 2021, Хвойница (https://catwar.su/cat209467) // @license MIT; https://opensource.org/licenses/MIT // @match https://*.catwar.su/cw3/ // @grant none // ==/UserScript== (function($) { 'use strict'; $('#msg_send').click(function() { const mess = $('#text').val().trim(); if (/^\/активность$/.test(mess)) { $('#text').val(''); $.get('/', function (data) { const temp = $('<div/>', { html: data }); alert(`Активность персонажа ${temp.find('big').first().text()}: ${temp.find('#act_name').text()}`); }); } }); })($);