// ==UserScript== // @name Agma Chat Command Settings // @namespace agma-chat-command-settings // @version 2.0.1 // @description Configure your settings using the chat. // @author Nuke // @match *://agma.io/ // @grant none // @downloadURL none // ==/UserScript== !function(){var e={};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_COMMAND=e.DEFAULT_OPTIONS=e.DEFAULT_INFORMATION=void 0,e.DEFAULT_INFORMATION={name:void 0,version:"1.0.0",description:void 0,author:void 0},e.DEFAULT_OPTIONS={silent:!1,chatElementSelector:void 0,prefix:"/",exposeToWindowObject:!1},e.DEFAULT_COMMAND={disabled:!1,clearChat:!0};var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.error=t.warn=t.log=void 0,t.log=function(e){return console.log("(@agmajs/core)[LOG]: "+e)},t.warn=function(e){return console.warn("(@agmajs/core)[WARN]: "+e)},t.error=function(e){return console.error("(@agmajs/core)[ERROR]: "+e)};var n={};Object.defineProperty(n,"__esModule",{value:!0}),n.isFunction=void 0,n.isFunction=function(e){return"function"==typeof e};var i={};Object.defineProperty(i,"__esModule",{value:!0}),i.ChatContext=i.createChatContext=void 0,i.createChatContext=function(e){return new o(e)};var o=function(){function e(e){this._chatElement=document.querySelector(e)}return e.prototype.value=function(e){if(void 0===e)return this._chatElement.value;this._chatElement.value=e},e.prototype.clear=function(){this.value("")},e}();i.ChatContext=o;var r={},s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n{if("on"==n[1]||"off"==n[1]){const e="on"===n[1],t=I.find(e=>!!e&&e[0]==n[0]);if(!t)return void N(`No setting found with name "${n[0]}"`,{textColor:D.RED});const[i,o]=t;o(e),N(`The setting "${i}" has been turned ${e?"on":"off"}`,{textColor:e?D.LIME:D.RED})}}})];const{createScript:R}=_,{name:k,version:B,description:W,author:z}={name:"agma-chat-command-settings",version:"2.0.1",description:"Configure your settings using the chat.",author:"CodingWithNuke"},G=R({name:k,version:B,description:W,author:z},{chatElementSelector:"#chtbox"});U.forEach(e=>G.command(e.name,e))}();