// ==UserScript== // @name Agma Chat Command Settings // @namespace agma-chat-command-settings // @version 2.3.3 // @description Configure your settings using the chat. // @author CodingWithNuke // @license MIT // @match *://agma.io/* // @grant none // @downloadURL none // ==/UserScript== !function(){var e={};Object.defineProperty(e,"__esModule",{value:!0}),e.ChatContext=e.createChatContext=void 0,e.createChatContext=function(e){return new n(e)};var n=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.prototype.focus=function(){this._chatElement.focus()},e}();e.ChatContext=n;var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_COMMAND=t.DEFAULT_OPTIONS=void 0,t.DEFAULT_OPTIONS={info:{version:"1.0.0"},prefix:"/"},t.DEFAULT_COMMAND={clearChat:!0};var i={};Object.defineProperty(i,"__esModule",{value:!0}),i.debug=i.error=i.warn=i.log=void 0,i.log=function(e){console.log("[io-scripts (LOG)]: "+e)},i.warn=function(e){console.warn("[io-scripts (WARN)]: "+e)},i.error=function(e){console.error("[io-scripts (ERROR)]: "+e)},i.debug=function(e){console.log("[io-scripts (DEBUG)]: "+e)};var o="2.1.1",a={},r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var n,t=1,i=arguments.length;t0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)&&!(i=a.next()).done;)r.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(o)throw o.error}}return r},m=this&&this.__spreadArray||function(e,n,t){if(t||2===arguments.length)for(var i,o=0,a=n.length;o{if(1==t.length){const e=$.find(e=>!!e&&(Array.isArray(e.name)?e.name.find(e=>e==t[0]):e.name==t[0]));if(!e)return void R(`No setting found with name "${t[0]}"`,{alertElementSelector:"#curser",textColor:V.RED});const{displayName:n,id:i}=e,o=document.getElementById(i);R(`The setting "${n}" is turned ${o.checked?"on":"off"}`,{alertElementSelector:"#curser",textColor:o.checked?V.LIME:V.RED})}if(2==t.length&&("on"==t[1]||"off"==t[1])){const e="on"===t[1],n=$.find(e=>!!e&&(Array.isArray(e.name)?e.name.find(e=>e==t[0]):e.name==t[0]));if(!n)return void R(`No setting found with name "${t[0]}"`,{alertElementSelector:"#curser",textColor:V.RED});const{displayName:i,function:o,id:a}=n,r=document.getElementById(a);o(e),r.checked=e,R(`The setting "${i}" has been turned ${e?"on":"off"}`,{alertElementSelector:"#curser",textColor:e?V.LIME:V.RED})}}})];const{createScript:z}=O,{name:Z,version:Y,description:q,author:H}={name:"agma-chat-command-settings",version:"2.3.2",description:"Configure your settings using the chat.",author:"CodingWithNuke"},K=z({info:{name:Z,version:Y,description:q,author:H},chatElementSelector:"#chtbox",silent:!0});W.forEach(e=>K.command(e.name,e))}();