Skip to content

Instantly share code, notes, and snippets.

@AmaanC
Forked from blha303/irccloud-colorize.js
Created November 18, 2015 17:20
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 AmaanC/50e29bf3efb243d89686 to your computer and use it in GitHub Desktop.
Save AmaanC/50e29bf3efb243d89686 to your computer and use it in GitHub Desktop.
IRCCloud replace & with formatting characters | &b is bold, &r is reset, &<number from 0 to 15> is a color | I'm going to regret this.
var inputbox = $('#bufferInputView' + cb().bid());
var msg = inputbox.val();
inputbox.val("");
var cc = "\u0003";
var bold = "\u0002";
var reset = "\u000f";
var italic = "\u0016";
var underline = "\u001f";
cb().say(msg.replace(/&b/g,bold).replace(/&r/g,reset).replace(/&i/g,italic).replace(/&u/g,underline).replace(/&/g,cc));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment