Super Color Name Changer

Automatically changes the name of your nickname on cells in Agma!

目前為 2020-11-16 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Super Color Name Changer
// @namespace    Super Color Name Changer
// @version      1.0.2
// @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);
              colorInterval = null;
              message('Nickname color blinking off');
          } else {
              colorInterval = setInterval(function(){document.getElementById('cGoldName').dispatchEvent(new MouseEvent("click"));},250);
              message('Nickname color blinking on');
          }
        }
      });

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址