// ==UserScript==
// @name reply helper :v]]
// @namespace s4s4s4s4s4s4s4s4s4s
// @include https://boards.4chan.org/s4s/*
// @include http://boards.4chan.org/s4s/*
// @version 1.01
// @grant none
// @author le fun css man AKA Doctor Worse Than Hitler
// @email [email protected]
// @description Adds a 'help bar' to your quick reply box on [s4s]
// ==/UserScript==
//this is the replacement list. the key on the left shows as an option, the text on the right is what's inserted
//edit this to customize everything.
// note: if u edit it and its stops working, chances are you're not escaping ur quote characters (add
// a \ in front of "s and 's if ur not sure what to do).
// also, make sure that (unless it's the last entry in the list), there is a "," after the ending quote
window.helpList = {
dubs: 'nice dubs',
fedora: "\n░░░░░░░░░▄▄▄▄▄▄░░░░░░░░░░░░░░░\n░░░░░░░▄▀█▀█▄██████████▄▄░░░░░\n░░░░░░▐██████████████████▌░░░░\n░░░░░░███████████████████▌░░░░\n░░░░░▐███████████████████▌░░░░\n░░░░░█████████████████████▄░░░\n░░▄█▐█▄█▀█████████████▀█▄█▐█▄░\n▄██▌██████▄█▄█▄█▄█▄█▄█████▌██▌\n████▄▀▀▀▀████████████▀▀▀▀▄████\n█████████▄▄▄▄▄▄▄▄▄▄▄▄██████▀░░\n░░▀▀████████████████████▀░░░░░",
kek: 'kek',
nice: "\n░░░░░░░░░░░░░░░░░░░░░\n░░░░░░░░░░░░░░░░░░░░░▄▄░░░▄\n░░░░░░░░░░▄▄▄▀▀▀▀▀▀▀▄▌██░██▐\n░░░░▄▄░▄▀▀▒▒▒▒▒▒▒▒▒▒▒▒▀▒▀▄██\n░░░▐▐█▀▒▒▄▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀▒▌\n░░░▌███▄██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀▐\n░░█▒▒█▀███▌▒▒▒▒▐▒▒▒▒▒▒▒▒▒░▒░░█\n░▐▒▒█▌▐▌▀▀▒░▒░▒▌▌▒░▒░▒▒█▒░░░░░▌\n░▐▒▒▀▒▐█░░░░░░█░▄▀░░░░▐░█▒▒▒▒▒▐\n░▌░░░▒░▒▌▒░▒░▐░▀▐▒▒░▒░▌░░█▒▒▌▒▐▄\n░▌▒░▒░░▐▒▒▒▒▒▌░░░▌▒▐▐▐▄▀▀▀▌▒▌▒▌▌▀\n▐▒▒▒▒▒▒▐▒▌▒▒▐▄▀▀▐▐▒▌▒▌▒▌▒▄▒▌▌▒█▐\n▐▒▒▒▒▒▒▌▒▐▒▒▌▌▒█▄░▀░░░░▀▀▀▀▐▐▐░▌ \n▌▒▒▒▒▒▐▒▒▒▀▄░▀▀░░░░░░░░░░░░▐▒▌\n▀▐▒▄▒▒▌▐▐▒▒▒▌▄░░░░░▀▄▀░░░▄▀▒▌▌\n░░▐░▀▀░▐▒▌▒▒▐▒▀▄▄▄▄▄▄▄▄▀▐▒▒▐░▐\n░░░░░░░░█▐▒▄▀▄▌█▄▄▄▀▀█░░░█▄▀▌\n░░░░░░░░░█▀▀▀░▀▀█▀█▀▀█▀▀▀▀▄\n░░░░░░░░█░░░░░░░░░█▀▄░▀▄░░░▌\n░░░░░░░▐▌░▄░░░░░░░█░░░░░█▄▄█\n░░░░░░░█░░░░░▄░░▄██▀▀█▀█░▀▄█",
problem: "\nThe problem is, OP, that you probably arent seeing all the posts. If you are just viewing [s4s] through the /s4s/ board, you don't see the green posts, the posts with letters in their ids, or anything numberless. Together, those make up about 40-70 percent of [s4s], depending on the day. So conversation will appear disjointed and spastic, because you won't be getting the full picture. \n\nI actually just flipped over to the /s4s/ interface to make this post, and it's pretty funny how unintelligible [s4s] is like this. ",
skelitun: "\n░░░░░░░░░░░░▄▐\n░░░░░░▄▄▄░░▄██▄\n░░░░░▐▀█▀▌░░░░▀█▄\n░░░░░▐█▄█▌░░░░░░▀█▄\n░░░░░░▀▄▀░░░▄▄▄▄▄▀▀\n░░░░▄▄▄██▀▀▀▀\n░░░█▀▄▄▄█░▀▀\n░░░▌░▄▄▄▐▌▀▀▀\n▄░▐░░░▄▄░█░▀▀ U HAVE BEEN SPOOKED BY THE\n▀█▌░░░▄░▀█▀░▀.\n░░░░░░░▄▄▐▌▄▄\n░░░░░░░▀███▀█░▄\n░░░░░░▐▌▀▄▀▄▀▐▄SPOOKY SKILENTON\n░░░░░░▐▀░░░░░░▐▌\n░░░░░░█░░░░░░░░█\n░░░░░▐▌░░░░░░░░░█\n░░░░░█░░░░░░░░░░▐▌\n",
smug: "\n░░░░░▄███████████████████████▄\n░▄▄▄█████████░░░▀██▀░░▐██████▌\n█████████▀███▌░░░▄░░▄░▐▀▄███▀\n██████████░░▀▀░▄█▀░░▀█▄░░░▌\n████████░▀▀░░░░░░░░░░░░░░░░▌\n███████▌░░░░▄▄▄▀░░░░░░░▄▄▀▄░▌\n███████░░░▄▀░░░░░░░░░░▐██▄░▀▐\n██████▌░▀██▄█░▀░░░░░░░░▄░░░░░▌ \n██████▌░░░░░░░░░░░░░░░░▄▀░░░░▐ \n██▀░▀██░░░░░░░░░░░░░░░░░░░░░░▐ \n█░▄▀▄░█▌░░░░░░░░░░░░░░░░░░░░░▐\n█▌░░▌░▀█░░░░░░░░░░▄▀▀▀▄▄▀░░░░▌\n██▄▄░░░██░░░░░░░░░░░░░░░░░░░▐\n█████████▄░░░░░░░░░░░░░░░░░▐\n██████████▌░░░░░░░░░░░░░░░▐\n███████████▄▀▀▀▄▄▄░░░░░░░▐\n█████▀▀▀▀███▄▄▄▄▄▄███████\n▒▒▄▀▒▒▒▒▒▒▀██▄▒▒▒▒▐██████▌░▄▄▄▄\n▄▀▒▒▒▒▒▒▒▒▒▐██▌▒▒▒▒█████▀██▒▒▒▒▀▄\n▒▒▒▒▒▒▒▒▒▒▒▒▒▀█▒▒▒▒▌▒▒▒▒▒▒▀▄▒▌▌▒▒\n▒▒▒▒▒▒▒▒▒▒▒▒▒▌▀▒▒▒▒▒▒▒▒▒▌▒▒▒▒▐▐▒▒",
swaglord: "\n░░▃▄▟█████████▄▄\n░▟██████████████▙\n▐████▀░░░░░░█████▙\n▐█▛░░░░░░░░░▜█████▙\n▐▛░░░░░░░░░░░▜█████▖\n▐░░░░░░░░░░░░░░░▜▒▒▛▚▖\n▐░░░░░░░░▗▞▀▀░░░░▒▒▌░▐\n▐░░░░░░░░▞ ▞■ ▏░░░░▒▌▒░▌\n░▚░░░░░░░▒░▔▔░░░░░▒▙░░▌\n░░▌▞▀█▘░░▒░░░░░░░░▒▒▌▞▚\n░░▜░▞■ ▚▍░▒░░░░░░░▒▒▒░░▚\n░░░▚▝▀▀▐░░░▞░░░░░▒▒▒▒░░ ▚▖\n░░░░▚░░░▚▂▞░▂▂░░░░░▒▒▞▀▚░▚\n░░░░░▚░░░░▗▀░░▞░░░░ ▞▘░▞▒▒░\n░░░░░░▜░░░▙▂▃▞░░░░▞▘░▞▒▒░░\n░░░░░░░▚▄▂░░░░░░░▞░░▞▒▒░░\n░░░░░░░▌░░▚░░░░▞▀░░▞▒▒░░\n░░░░░░░░▚░░▚▄▄▞░░░▞▀▚░\n░░░░░░░░░▌░░░░░░░░░▒▞▖\n░░░░░░░░░▌░░░░░░░░░░▒▞\n░░░░░░░░░▌░░░░░░░░░░▞▖\n░░░░░░░░░▌░░░░░░░░░░▞",
toplel: "\n░░░░░░░░░░░░▄▀▀▌\n░░░░░░░▄▀█░░█▄▀\n░░░▄▄▀▐▌░▐▌░█░░░▄▄▀▀▌\n░▀▀█░░█▄▄▀░░▄▄▀▀▌▄█▌▌\n░░░█░░░░░▄▀▀▄▄▐▒▌███▐\n░░░▀░░░▐▀▄█▀▀▒▒▒▌███▐\n░░▄▀▀▌░▐▐██▌▒▄▐▒▌███▐▀▐\n▐▀▄█▌▌░▐▐█████▐▒▌███▄█▐\n▐▐██▌▌░▐▐███▀▒▒▒▌████▀▐\n▐▐██▌▌░▐▐███▒▄▐▒▌█▀▄▄▀▀\n▐▐██▌▌▀▐▐█████▐▒▄▄▀\n▐▐██▌▄█▐▐█▀▀▄▄▀▀\n▐▐████▀▐▄▄▀▀\n▐▐█▀▀▄▀▀\n▐▄▄▀",
wew: "\n░░███░░▄███░░▐██▄░░▄██████▄░░███░░▄███░░▄██▌\n░░███▄░████░░███░▄███▀▀▀███▌░███▌░████▄░███▀\n░░▐██▌▐████▌▐███░████▄████▀░░▐██▌▄████▌▄███\n░░▀████████████░░██████▀▀░░░░░████████████▀\n░░░█████░█████▌░░████▄░░▄▄▄▄░░█████▀▐█████\n░░░▀███▀░▀████░░░░▀████████▀░░▀███▀░░████▀\n░░░░▀▀▀░░░▀▀▀░░░░░░░░▀▀▀▀░░░░░░▀▀▀░░░▀▀▀▀",
who: 'who are you quoting?',
wiz: 'wizzle wazzle',
yee: "\n░░░░░░░░░░░░░▄███▄▄▄░░░░░░\n░░░░░░░░░▄▄▄██▀▀▀▀███▄░░░░\n░░░░░░░▄▀▀░░░░░░░░░░░▀█░░░\n░░░░▄▄▀░░░░░░░░░░░░░░░▀█░░\n░░░█░░░░░▀▄░░▄▀░░░░░░░░█░░\n░░░▐██▄░░▀▄▀▀▄▀░░▄██▀░▐▌░░\n░░░█▀█░▀░░░▀▀░░░▀░█▀░░▐▌░░\n░░░█░░▀▐░░░░░░░░▌▀░░░░░█░░\n░░░█░░░░░░░░░░░░░░░░░░░█░░\n░░░░█░░▀▄░░░░▄▀░░░░░░░░█░░\n░░░░█░░░░░░░░░░░▄▄░░░░█░░░\n░░░░░█▀██▀▀▀▀██▀░░░░░░█░░░\n░░░░░█░░▀████▀░░░░░░░█░░░░\n░░░░░░█░░░░░░░░░░░░▄█░░░░░\n░░░░░░░██░░░░░█▄▄▀▀░█░░░░░\n░░░░░░░░▀▀█▀▀▀▀░░░░░░█░░░░\n░░░░░░░░░█░░░░░░░░░░░░█░░░",
zoobidey: "\nWhat the zoobidey flip-flop-bop did you just say about me, you flippidy zoob woobity? I'll have you know I zooped and flooped to the top of my class in the zobbler wobbler, and I've rop-wop-flopped in numerous shoobidy doobidies on floppity pudding, and I have over 300 shibbidy bops. I am trained in flap-floppities and I'm the top doober in the entire shibbidy. You are nothing to zoobidy-me but just another zoobidy. I will zoop you the blop out with precision the likes of which has never been seen before on this floobidy Earth, mark my flibbidy flop. You think you can flop away with zoobing that doobie-woobie to me over the Interzoobies? Think again, flap-flopper. As we speak I am zipping my blopping bloop of flobbidies across the boopidy and your floopidy is being flopped right now so you better poopidy for the big zoobidy flop party, son. You're jeeber zeebered, son. I can be anywhere, any-flopping-time, and I can zoop and woop you in over seven hundred ways, and that's just with my boobidy shoobidies. Not only am I extensively zooped in zip-wop, but I have access to the entire zabber of the Zap Wop Muggity Top and I will zoop it to its full extent to flap your flobbity flob off the face of the zoobie, you zabber wabber. If only you could have known what zopping fury your little \"zoopity\" comment was about to bring down upon you, maybe you would have zooped up. But you couldn't, you didn't, and now you're paying the price, you flapping babbling shooby-wooper. I will zip zop all over you and you will drown in it. You're zooped, son. "
}
//checks to see if quickreply exists and adds the help bar to it if it does
function addHelpBar(){
//grab the quickreply box so we can modify it
var quickreply = document.getElementById('qrForm');
//make sure it exists and the helpbar hasn't already been added
if(quickreply != null && document.getElementById("qrHelpBar") == null){
//alert('reply');
//create and configure the helpbar
var bar = document.createElement('div');
bar.id="qrHelpBar";
bar.style="max-width: 296px;";
//add the options specified earlier in window.helpList
for(var key in window.helpList) {
//yeah, the onclick is a hacky way of adding the text but im fuggin lazy m8
bar.innerHTML+='[<a title="'+window.helpList[key]+'" onclick="document.getElementById(\'qrForm\').childNodes[2].childNodes[0].value+=window.helpList[\''+key+'\'] + \' \';">'+key+'</a>] ';
}
//add the helpbar before the captcha
quickreply.insertBefore(bar, quickreply.childNodes[3]);
}
}
// these next few lines set up the mutation observer we will use to determine when quick
// reply is opened
// see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver for reference
//listening on the body because that's what quickreply is appended to
var target = document.body;
//only need to listen to the childlist mutations because that's what quickreply is appended to
var config = { childList: true };
//observer code, just calls the "addHelpBar function"
var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
addHelpBar();
});
});
//start the mutation observer
observer.observe(target, config);