Automatically changes the name of your nickname on cells in Agma!
当前为
// ==UserScript==
// @name Super Color Name Changer
// @namespace Super Color Name Changer
// @version 1.0.1
// @description Automatically changes the name of your nickname on cells in Agma!
// @author Arimas
// @license MIT
// @match *://agma.io/
// @grant none
// ==/UserScript==
(function() {
'use strict';
var message = function (message, isError) {
var curser = document.querySelector('#curser');
curser.textContent = message;
curser.style.display = 'block';
curser.style.color = isError ? 'rgb(255, 0, 0)' : 'rgb(0, 192, 0)';
window.setTimeout(function () {
curser.style.display = 'none';
}, 5000);
};
var colorInterval;
window.addEventListener('miracleCommand', function(commandEvent) {
if (commandEvent.command === '/blink') {
$('#chtbox').val('').focus();
if (colorInterval) {
clearInterval(colorInterval);
message('Nickname color blinking off');
} else {
colorInterval = setInterval(function(){document.getElementById('cGoldName').dispatchEvent(new MouseEvent("click"));},250);
message('Nickname color blinking on');
}
}
});
})();