// ==UserScript== // @name Agma Chat Command Settings // @namespace agma-chat-command-settings // @version 2.2.2 // @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 n={};Object.defineProperty(n,"__esModule",{value:!0}),n.error=n.warn=n.log=void 0,n.log=function(e){return console.log("(@agmajs/core)[LOG]: "+e)},n.warn=function(e){return console.warn("(@agmajs/core)[WARN]: "+e)},n.error=function(e){return console.error("(@agmajs/core)[ERROR]: "+e)};var i={};Object.defineProperty(i,"__esModule",{value:!0}),i.isFunction=void 0,i.isFunction=function(e){return"function"==typeof e};var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.ChatContext=t.createChatContext=void 0,t.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}();t.ChatContext=o;var a={},r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var n,i=1,t=arguments.length;i{if(1==i.length){const e=B.find(e=>!!e&&(Array.isArray(e.name)?e.name.find(e=>e==i[0]):e.name==i[0]));if(!e)return void D(`No setting found with name "${i[0]}"`,{textColor:G.RED});const{displayName:n,id:t}=e,o=document.getElementById(t);D(`The setting "${n}" is turned ${o.checked?"on":"off"}`,{textColor:o.checked?G.LIME:G.RED})}if(2==i.length&&("on"==i[1]||"off"==i[1])){const e="on"===i[1],n=B.find(e=>!!e&&(Array.isArray(e.name)?e.name.find(e=>e==i[0]):e.name==i[0]));if(!n)return void D(`No setting found with name "${i[0]}"`,{textColor:G.RED});const{displayName:t,function:o,id:a}=n,r=document.getElementById(a);o(e),r.checked=e,D(`The setting "${t}" has been turned ${e?"on":"off"}`,{textColor:e?G.LIME:G.RED})}}})];const{createScript:U}=O,{name:V,version:W,description:$,author:z}={name:"agma-chat-command-settings",version:"2.2.2",description:"Configure your settings using the chat.",author:"CodingWithNuke"},Z=U({name:V,version:W,description:$,author:z},{chatElementSelector:"#chtbox",silent:!0});R.forEach(e=>Z.command(e.name,e))}();