User:Cheeseskates/chat.js

////////////////////////////////////////////////////////////////////////////////

/* -- -- */ ////////////////////////////////////////////////////////////////////////////////
 * * Name:       Global Chat JavaScript                                      |
 * * Author:     Sophiedp - Cheeseskates                                     |
 * * Description: This is my chat.js that can load on all wikis like         |
 * global.js can. It is thanks to Sophiedp's script you can   |
 * put in TamperMonkey.                                       |
 * https://openuserjs.org/scripts/LunarTwilight/Load_global.js_in_chat/source |
 * put in TamperMonkey.                                       |
 * https://openuserjs.org/scripts/LunarTwilight/Load_global.js_in_chat/source |
 * https://openuserjs.org/scripts/LunarTwilight/Load_global.js_in_chat/source |

//————————————————————————————————————————————————————————————————————————————// // Direct JavaScript code // //————————————————————————————————————————————————————————————————————————————//

/**/ ///————————————————————— Major Direct JavaScript code ———————————————————————/// /**/

/* -- -- */
 * * Name:       Slash commands                                              |
 * * Author:     Cheeseskates                                                |
 * * Description: Using slash commands, I can generate preset messages       |
 * through typing a short word or phrase that would be similar |
 * to the preset message. This helps send messages quickly    |
 * while taking action as fast as possible.                   |
 * e.g. warning and kicking.                                  |
 * while taking action as fast as possible.                   |
 * e.g. warning and kicking.                                  |

// Make it generate the message when I press Enter or Space $('[name="message"]').keypress(function(a) { if (32 == a.which || 13 == a.which) {    switch(this.value) {      case "/coppa":        this.value = "COPPA - You must be 13 or older to legally have an account on Wikia.";        break;      case "/swear":        this.value = "Please don't swear,";        break;      case "/spam":        this.value = "Please don't spam,";        break;      case "/troll":        this.value = "Please don't troll,";        break;      case "/disrupt":        this.value = "Please don't disrupt the chat,";        break;      case "/caps":        this.value = "Please don't comment with excessive capslock characters,";        break;      case "/slur":        this.value = "Please don't use slurs,";        break;      case "/nsfw":        this.value = "Please don't post NSFW comments,";        break;      case "/shock": this.value = "Please don't post shocking content,"; break; case "/minimod": this.value = "Please don't mini-mod,"; break; case "/rp": this.value = "Please don't roleplay on the main chat,"; break; case "/ad": this.value = "Please don't advertise unrelated content,"; break; case "/bye": this.value = "Take it easy."; } } });

/**/ ///————————————————————— Minor Direct JavaScript code ———————————————————————/// /**/ // Add when necessary

//// // ——————————————————— End Direct Import JavaScript Code ———————————————————— // ////

//————————————————————————————————————————————————————————————————————————————// // Script Configurations -// //————————————————————————————————————————————————————————————————————————————//

// ChatBlockButton Configuration chatBlockReason = "Misbehaving", "Social Disruption", "Canvassing", "Gaming the system", "Spam", "Flood", "Troll.", "Banditry", "Shock", "Cross-wiki drama", "Cross-wiki vandal/troll", "Vandal/spam bot", "Sockpuppetry", "Sockpuppet", "Violation",

// QuickModTools Configuration window.QuickModTools = { quickreasons: [ "Misbehaving", "Social Disruption", "Canvassing", "Gaming the system", "Spam", "Flood", "Troll.", "Banditry", "Shock", "Cross-wiki drama", "Cross-wiki vandal/troll", "Vandal/spam bot", "Sockpuppetry", "Sockpuppet", "Violation", ], };

//// // ——————————————————————— End Configuration Section ———————————————————————— // ////

//————————————————————————————————————————————————————————————————————————————// // Imports ---// //————————————————————————————————————————————————————————————————————————————//

$(function {    importArticles({ type: "script", articles: [ "u:dev:MediaWiki:BlinkingTabAlert.js", "u:dev:MediaWiki:ChatModHover/code.js", "u:dev:MediaWiki:ChatTimestamps/code.js", "u:dev:MediaWiki:ChatUserPageButton.js", "u:dev:MediaWiki:FasterBanModule/code.js", "u:dev:MediaWiki:GiveChatModPrompt/code.js", "u:dev:MediaWiki:MessageBlocker/code.js", "u:dev:MediaWiki:QuickModTools/code.js", "u:steven-universe:User:Andrey Andrey/chat.js", ]   }); });

//// // —————————————————— End ImportArticles section and page ——————————————————— // ////