Skip to content

Instantly share code, notes, and snippets.

@KevOrr
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KevOrr/0053e06451314a8fa2d5 to your computer and use it in GitHub Desktop.
Save KevOrr/0053e06451314a8fa2d5 to your computer and use it in GitHub Desktop.
Perichat Buttons

I'll keep all of the Perichat Buttons userscripts here from now on.

Installation

  1. Required frameworks
  1. Click Raw next to each script you wish to install
  2. Enjoy
  3. Hopefully, if I have it set up correctly, these scripts should self-update if I push a new file here

Use

  1. Refresh/open Public Periwinkle Chat
  2. Use the Rainbow FERT button only in times of extreme exuberance (e.g. after a corageous victory)
  3. Use the FERT button for smaller joys

Notes

// ==UserScript==
// @name Perichat All Emotes Button
// @author Kevin Orr (/u/Elaifiknow) <kevinorr54@gmail.com> <http://www.reddit.com/message/compose?to=elaifiknow>
// @namespace com.kevincorr
// @version 1.1.2
// @description Displays all available emoticons for Perichat in a new window
// @match http://periwinkleinnovations.com/publicchat/
// @match https://periwinkleinnovations.com/publicchat/
// @update URL https://gist.github.com/KevOrr/0053e06451314a8fa2d5/raw/perichat_all_emotes_button.user.js
// @copyright 2014+, Kevin Orr
// ==/UserScript==
$(document).ready(function(){
buttons = document.getElementById('bbCodeContainer');
if (!buttons) {
return;
}
emotesButton = document.createElement('input');
emotesButton.type = 'button';
emotesButton.value = 'All Emotes';
emotesButton.id = 'AllEmotesButton';
$(emotesButton).click(function(){
w = window.open('', '_blank');
b = w.document.body;
b.innerHTML = '<pre>\n';
b.innerHTML += ajaxChatConfig.emoticonCodes.join('\n<br />\n');
b.innerHTML += '\n</pre>';
});
buttons.appendChild(emotesButton);
});
// ==UserScript==
// @name Perichat FERT Buttons
// @author Kevin Orr (/u/Elaifiknow) <kevinorr54@gmail.com> <http://www.reddit.com/message/compose?to=elaifiknow>
// @namespace com.kevincorr
// @version 1.0.5
// @description Adds FERT buttons to Perichat
// @match http://periwinkleinnovations.com/publicchat/
// @match https://periwinkleinnovations.com/publicchat/
// @match https://gist.github.com/KevOrr/0053e06451314a8fa2d5/raw/perichat_fert_buttons.user.js
// @copyright 2014+, Kevin Orr
// ==/UserScript==
$(document).ready(function(){
buttons = document.getElementById('bbCodeContainer');
if (!buttons) {
return;
}
rainbowButton = document.createElement('input');
rainbowButton.type = 'button';
rainbowButton.value = 'Rainbow FERT';
rainbowButton.id = 'RainbowFERTButton';
$(rainbowButton).click(function(){
ajaxChat.insertText('[color=gray]FERT[/color] [color=silver]FERT[/color] [color=white]FERT[/color] '
+ '[color=yellow]FERT[/color] [color=orange]FERT[/color] [color=red]FERT[/color] '
+ '[color=fuchsia]FERT[/color] [color=purple]FERT[/color] [color=navy]FERT[/color] '
+ '[color=blue]FERT[/color] [color=aqua]FERT[/color] [color=teal]FERT[/color] '
+ '[color=green]FERT[/color] [color=lime]FERT[/color] [color=olive]FERT[/color] '
+ '[color=maroon]FERT[/color] [color=black]FERT[/color]');
});
buttons.appendChild(rainbowButton);
fertButton = document.createElement('input');
fertButton.type = 'button';
fertButton.value = 'FERT';
fertButton.id = 'FERTButton';
$(fertButton).click(function(){
inputField = document.getElementById('inputField');
if (inputField.value.length > 0
&& inputField.value[inputField.value.length - 1] != ' ') {
ajaxChat.insertText(' ');
}
ajaxChat.insertText('[color=#9494ff]FERT[/color]');
inputField.focus();
});
buttons.appendChild(fertButton);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment