MediaWiki:Chat.js/inline.js

var CustomAlerts = {}; // command list CustomAlerts.cmd = { waffles: "(party) Waffle party! (party)", gaben: "ALL HAIL LORD GABEN (gaben) ", dbz: "Always bet on dbz Keepo ", dbz2: "Never bet on dbz Kappa ", dbz3: "Always sometimes never bet on DBZ...maybe OpieOP ", potato: "Potato ate my toilet D: ", orbsome: ("Orb is 2orbsome").sup, quiz1: "QUIZ TIME! Who is the main hero in Feshe Adventures? a) Feshe; b) Hesum; c) Orbagel; d) Obama ", walruses: "Walrus party! OpieOP ", goldaccount: ("Sorry! You need a PVZCC Gold Account to access that feature.").fontcolor("goldenrod"), premium: ("Sorry! You need a PVZCC Premium Account to access that feature.").fontcolor("purple"), shipping: "I ship Reapeageddon and Princess Kitty.", languagejoke: "I do not speak English!", titledefense: "ZEM TITLE'S MINE, YOU AIN'T NEVER GONNA GET IT!", notfounderror : "404 not found!", sandstorm : " dududu dududu dududu dududu dududu SANDSTORM dududu dududu dududu dududu dududu ", rgb : ("red ").fontcolor("red") + ("green ").fontcolor("green") + ("blue ").fontcolor("blue"), GameMaker : "I make games using GameMaker! (gaben) ", mlg : "(party) (party) (party) SAMPLE MLG TEXT (party) (party) (party)", blargh : ("VOMIT ALERT").fontsize(4).fontcolor("firebrick"), nuke : ("TACTICAL NUKE INCOMING!").fontcolor("red").fontsize(5), hype : (" PogChamp THE HYPE! PogChamp ").fontcolor("blue"), hypetrain : (" PogChamp GET ON THE HYPE TRAIN! PogChamp ").fontcolor("blue"), illu : (" (illu) Join us. (illu)").fontcolor("darkgreen"), salt: (" (illu) In Salt we Trust (illu) ").fontcolor("darkgreen"), beginchoices : "Welcome to Choices! Which version do you want to play?? Type !fchoices for feshe adventures version.", fchoices : "You wake up as Feshe. You read a chapter from a book about bad things happening when a " + ("f").fontcolor("red") + "ish found a secret code. Freaky. Anyways, what do you do? - Type !fchoices1a to do a feshe dance, or type !fchoices1b to make weird noises.", fchoices1a : "You did a weird dance. Hesum walked into your room and saw you doing the weird dance. How do you " + ("r").fontcolor("orange") + "eact? Type !fchoices2a to go and cry in a corner, or type !fchoices2b to say hai to Hesum.", fchoices1b : "You made weird noises. You then realised these weird noises were the chant used to turn int" + ("o").fontcolor("yellow") + " a chicken. You then turned into a chicken. Type !fchoices2c to go and scream at Orbagel, or type !fchoices2d to go to the nearest hospital.", fchoices2a : "You went to cry in a corner because Hesum invaded your privacy. Hesum decided to end her friendship with you cuz you aint fab no more. GAME OVER. Type !fchoices to try again...", fchoices2b : "You greet Hesum. She says 'hai, just wondering if you can come to my fab concert tonite' Type !fchoices3a to say yes, or type !fchoices3b to say no.", fchoices2c : "You decide to run up to Orbagel and scream at him. He tells you to calm your little toes and tell him whats wrong. Type !fchoices3c to rage at orbagel for being stupid enough not to notice that you are a chicken, or type !fchoices3d to explain what happened to you.", fchoices2d : "You decide to go to the hospital. You are greeted by a nurse. Type !fchoices3e to ask for medicine, or type !fchoices3f to ask for surgery.", fchoices3a : "You said you'll show up. Hesum says thanks in a fabulous way, then goes to prepare for the concert. What will you wear to the concert? Type !fchoices4a to wear a doge cosplay, or type !fchoices4b to wear a miriampoid cosplay.", fchoices3b : "You said you can't come. Hesum says that's okay in a fabulous way. Later that day, Orbagel asks why you didn't turn up. Type !fchoices4c to say because hesum makes terrible music, or type !fchoices4d to say because you had a bad back.", fchoices3c : "You rage because of Orbagel's stupidity. Orbagel flies away crying while chewing on his toes and farting on a mimic octopus. GAME OVER. Type !fchoices to try again...", fchoices3d : "You explain what's going on to Orbagel. Orbagel says that you should try eating some cheese. Type !fchoices4e to eat a little cheese, or type !fchoices4f to eat a lot of cheese.", fchoices3e : "You ask the nurse to prescribe some medicine. The nurse brings you a blue pill and a red pill - " + ("w").fontcolor("green") + "hich one do you take? Type !fchoices4i to take the blue one, or type !fchoices4j to take the red one.", fchoices3f : "The nurse walks you to a dimly-lit surgery room and leaves you with this really weird looking guy. Type !fchoices4g to run away, or type !fchoices4h to stay put.", fchoices4a : "You put on the doge cosplay and go to the concert. Hesum compliments you on what you're wearing, and the concert begins. Type !fchoices5a to start cheering for Hesum, or type !fchoices5b to throw a water bottle at her.", fchoices4b : "You put on the miriampoid cosplay and go to the concert. Hesum hisses at you for stealing miriampoid's style, and her bodyguards kick you out of the concert. GAME OVER. Type !fchoices to try again, of course...", fchoices4c : "You tell Orbagel you didn't show up because Hesum's music is terrible. Orbagel is horrified at your statement, and knocks you out with a bagel. GAME OVER. Lewl, type !fchoices to try again! (>^^)>", fchoices4d : "You tell Orbagel you had a bad back. Orbagel tries to help you by throwing a block of cheese at your back, but then you die somehow. GAME OVER LOL TRY AGAIN BY TYPING !fchoices", fchoices4e : "You eat a small amount of cheese. Bad amount of cheese! Your head turns into a block of cheese. You are " + ("n").fontcolor("blue") + "ow a cheesehead. Type !fchoices5c to run around in circles in terror, or !fchoices5d to give up on life and die.", fchoices4f : "You eat a giant amount of cheese. Great! You turn back to normal. How do you celebrate? Type !fchoices5e to throw a tea party, or type !fchoices5f to high-five Orbagel.", fchoices4g : "You make a run for it, but the weirdo catches you and throws a pokeball at you. You are feshechu. GAME OVER. Type !fchoices to try again...", fchoices4h : "You decide to stay put. The weirdo surgeon performs a successful operation, and you turn back to normal! How do you celebrate? Type !fchoices5g to high-five the weirdo, or type !fchoices5h to throw a darude party.", fchoices5a : "You cheer enthusiastically for hesum. Hesum performs excellently because of your support. " + ("GAME WON!!! ").fontcolor("green") + ("Achievement unlocked: Hesum's fab helper - unlock good ending f1.").fontcolor("yellow") + "Type !fchoices to play again...", fchoices5b : "You throw a water bottle at hesum. This angers hesum, and she activates her final form. She turns into Justin Bieber, and kicks your donkey. GAME OVER. Type !fchoices to try again, baby.", fchoices5c : "You run around in circles in terror, eventually tripping and " + ("s").fontcolor("purple") + "omehow dying cuz you're one fragile chicken. GAME OVER. !fchoices to try again...", fchoices5d : "You give up and die. A few minutes later, Miley Cyrus walks upon you, and heals you with her magical twerking skills. You are back to normal!" + (" GAME WON!!!").fontcolor("green") + ("Achievement unlocked: Blessed by a Butt - unlock good ending f2.").fontcolor("yellow") + "Type !fchoices to play again!", fchoices5e : "You throw a tea party. Everything is fine until the teacups mutate and eat all your guests. GAME OVER. !fchoices to try again, d00d.", fchoices5f : "You high-five Orbagel. Yassss." + ("GAME WON!!!").fontcolor("green") + ("Achievement unlocked: Epic High-Five - Unlock good ending f3.").fontcolor("yellow") + "!fchoices to play again! YAS", fchoices5g : "You high-five the weirdo surgeon. He retaliates by karate chopping you. You die cuz you're a skrub. GAME OVER. !fchoices to try again, of course.", fchoices5h : "You throw a darude party. What a wubtastic night!" + (" GAME WON!!!").fontcolor("green") + ("Achievement unlocked: Wub wub wub - Unlock good ending f4.").fontcolor("yellow") + "!fchoices to play again, honey.", fchoices4j : "You take the red pill, and suddenly everything around you turns into waffles. The pill transported you to waffleland! Where do you go? Type !fchoices5i to go to the waffle library, or !fchoices5j to go to the waffle soda stand.", fchoices5i : "You go to the waffle library. A pink Orbagel is inside. Type !fchoices6a to murder him, or type !fchoices6b to ask for a book.", fchoices5j : "You go to the waffle soda stand. A pink Sudapup is running the stand. Type !fchoices6c to ask for some grapes, or type !fchoices6d to ask for some soda.", fchoices6a : "You murder the Pink Orbagel. His corpse poofs into a magical pink ring. You put it on, and you wake up. IT WAS A DREAM. But now you have this neat ring." + (" GAME WON!!").fontcolor("green") + (" Achievement unlocked: Waffleland murders - unlock good ending f5.").fontcolor("yellow") + "Type !fchoices to play again...", fchoices6b : "You ask for a book, but then the Pink Orbagel pulls off his mask and is a horrifying demon with three mouths. You fell for it's trick! It eats you alive. GAME OVER. Type !fchoices to try again, n00b.", fchoices6c : "You ask for some grapes. The Pink Sudapup gets super ticked, yells 'NO I DONT HAVE ANY GRAPES GET REKT' and throws a bomb at you. You died. GAME OVER. Type !fchoices to try again. opieOP ", fchoices6d : "You ask for some soda. The Pink Sudapup smiles and gives you a can of soda. Suddenly the Pink Sudapup kisses you and you have tons of babies and get married and stuff." + (" GAME WON!!").fontcolor("green") + (" Achievement unlocked: I kissed a Sudapup and I liked it - unlock good ending f6.").fontcolor("yellow") + "Type !fchoices to play again. (kappa) ", frowns : ("hhhhhh - !frowns1a: 'what?' !frowns1b: 'lolfunny' !yhsif: 'yhsif sehsinab ruoy tirips ot lleh ot nrub ni eht niap fo tnemegduj'").fontcolor("#8b1a1a"), yhsif : "You wake up as Feshe. You read a chapter from a book about bad things happening when a " + ("f").fontcolor("red") + "ish found a secret code. Freaky. Anyways, what do you do? - Type !fchoices1a to do a feshe dance, or type !fchoices1b to make weird noises.", frowns1a : "You throw a tea party. A few " + ("mi").fontcolor("#8b1a1a") + "nutes later, Miley Cyrus walks upon you, and heals you with her magical twerking skills. Bad amount of cheese! Hesum performs excellently because of your support.", frowns1b : "what?? leave me alone bad !frowns2a !frowns2b !frowns2c", frownsmi : ("no").fontcolor("#8b1a1a") + "You high-five the weirdo Orbagel. He Yasss chop" + ("Am I DOIng Iti. Rirght?!").fontcolor("#8b1a1a") + "A pi" + ("nk").fontcolor("green") + "Sudapup is " + ("help").fontcolor("#8b1a1a") + "Type !frowns2d to Suddenly kisses" + ("niap niap niap STOP").fontcolor("#8b1a1a"), frowns2a : ("you are an idiot").fontcolor("8b1a1a") + "we", frowns2b : ("!fchoices").fontcolor("#8b1a1a"), frowns2c : "hate" + ("rhbugwi").fontcolor("#8b1a1a") + ("og").fontcolor("blue") + ("igjojrg").fontcolor("#8b1a1a"), frownsmiweog : "AAAAAAAAAAAAaaAAaAAAaAAAaAaa YOU DID IT. YOU FOUND ME OUT. help THANK YOU SO MUCH no IIIIIII hhHHh now i CAN KILL YOUR LITTLE FRIENDS. I WILL CRACK OPEN THEIR HEADS LIKE THEY'RE EGGS. THE BLOOD AND FLESH WILL RUN DOWN THEIR FACE AS THEY CRY FOR HELP. THE CRIES WILL DO pleasedont NOTHING. ibegyou I WILL SLIT OPEN THEIR WRISTS AND TUG ON THEIR BLEEDING ARTERIES AND VEINS. THIS IS IT, MY FRIEND sorry THIS IS THE END OF FESHE ADVENTURES. HAHAHAHHAHHA !fchoices do it HAHAHHAHAHHA plESE" }; CustomAlerts.modOnlyCmds = [ "waffles", "quiz1", "goldaccount", "fhai", "nuke", "beginchoices", "feshechoices" ]; // observer CustomAlerts.obs = new MutationObserver(function(a) {	for (var i in a) {		for (var j in a[i].addedNodes) {			var node = a[i].addedNodes[j],				isMsg = false;			try {				if ( node.nodeType == 1 && typeof $(node).attr("data-user") === "string" && !$(node).hasClass("inline-alert") && // make sure that 'CustomAlerts.implement' doesnt attempt to replace custom alerts when inserted $(node).parents.eq(1).hasClass("Chat") ) {					// this is a chat message by some user					isMsg = true;				}			} catch(err) {}			if (isMsg) {				var message = $(node).find(".message").html,					cmd = message.match(/^\!(.+)/),					user = $(node).attr("data-user");				if (cmd) {					// command pattern found					CustomAlerts.implement(node, cmd[1], user);				}			}		}	} }); // function for replacing a node CustomAlerts.implement = function(node, cmd, user) { if (CustomAlerts.cmd.hasOwnProperty(cmd)) { // command exists - replace message with inline alert if (!(CustomAlerts.modOnlyCmds.indexOf(cmd) > -1 && !mainRoom.viewUsers.model.users.findByName(user).attributes.isModerator)) { // make sure that a non-mod did not attempt to use a mod-only command var li = $(' '); $(li).attr({				"data-user": $(node).attr("data-user"),				"class": "inline-alert pseudo-inline-alert"			}).html(WikiaEmoticons.doReplacements( CustomAlerts.cmd[cmd], ChatView.prototype.emoticonMapping ));			$(node).replaceWith(li); }	} } // add css to treat continue-messages after an alert as new messages mw.util.addCSS(	'.pseudo-inline-alert + .continued {\n' +		'\tmin-height: 32px;\n' +		'\tmargin-bottom: 0;\n' +		'\tpadding-top: 18px;\n' +		'\ttop: 0;\n' +	'}\n' +	'.Chat .pseudo-inline-alert + .continued img, .pseudo-inline-alert + .continued .time {\n' +		'\tdisplay: inline;\n' +	'}\n' +	'.pseudo-inline-alert + .continued .username {\n' +		'\tdisplay: block;\n' +	'}' ); // start observing chat CustomAlerts.obs.observe(document.querySelector("#WikiaPage"), {	childList: true,	subtree: true });