Skip to content

Instantly share code, notes, and snippets.

@blha303
Last active November 8, 2018 13:13
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save blha303/7938194 to your computer and use it in GitHub Desktop.
Save blha303/7938194 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));
@blha303
Copy link
Author

blha303 commented Mar 26, 2014

To produce bookmarklet: Remove line returns (go to the start of each line, hit backspace), copy into Add Bookmark window, add javascript: at the beginning.

@DanUgore
Copy link

Thanks! Just what I needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment