Skip to content

Instantly share code, notes, and snippets.

@ucnv
Created August 3, 2009 12:31
Show Gist options
  • Save ucnv/160522 to your computer and use it in GitHub Desktop.
Save ucnv/160522 to your computer and use it in GitHub Desktop.

Twitterface

A LimeChat theme adding Twitter icons for IRC nicknames.

Installation

  1. Open LimeChat Preferences -> Theme and click the "Open in Finder" button.
  2. Place Twitterface.yaml and Twitterface.js in the directory.
  3. Reopen Preferences -> Theme and select the Twitterface theme.
document.addEventListener('DOMNodeInserted', function(e) {
var line = e.target;
var nick = line.getAttribute('nick');
if(!nick) return;
var img = document.createElement('img');
img.onerror = function() {
this.src = 'http://static.twitter.com/images/default_profile_normal.png';
};
img.src = 'http://usericons.relucks.org/twitter/' + nick;
img.style.cssText = 'border: 0; width: 1.5em; height: 1.5em; margin-right: 3px;';
var sender = line.childNodes[1];
sender.insertBefore(img, sender.firstChild);
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment