Skip to content

Instantly share code, notes, and snippets.

@blha303
Created December 5, 2013 06:21
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 blha303/7800947 to your computer and use it in GitHub Desktop.
Save blha303/7800947 to your computer and use it in GitHub Desktop.
IRCCloud trout-slapping bookmarklet | Usage: Select the username or text you want to slap. If you can fix prompt(), please let me know.
javascript: (function () { var text = ""; if (window.getSelection) { text = window.getSelection().toString(); } else if (document.selection && document.selection.type != "Control") { text = document.selection.createRange().text; } else { text = prompt("Enter username", "everyone"); } if (!text) { text = "everyone"; } cb().say("/me slaps " + text.replace(/[<>@+~&]/g, '').trim() + " around a bit with a large trout"); }());
@fauaad
Copy link

fauaad commented Jul 20, 2015

Superb

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