Skip to content

Instantly share code, notes, and snippets.

@adelcambre
Created January 20, 2011 21:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adelcambre/788740 to your computer and use it in GitHub Desktop.
Save adelcambre/788740 to your computer and use it in GitHub Desktop.
make messages containing *green* green and containing *red* red in Propane
curl https://gist.github.com/raw/788740/4b337df4be4be4338e2466ef775cd685b57d9601/gistfile1.diff | patch -p0
--- /Applications/Propane.app/Contents/Resources/enhancer.js 2011-01-20 13:42:13.000000000 -0800
+++ /Applications/Propane.app/Contents/Resources/enhancer.js 2011-01-20 12:21:48.000000000 -0800
@@ -115,6 +115,12 @@
authorText = message.author();
}
+ if(body.match(/\*green\*/)) {
+ message.bodyCell.className += " green";
+ } else if (body.match(/\*red\*/)) {
+ message.bodyCell.className += " red";
+ }
+
window.propane.messageInserted(message.id(), this.authorID(message), authorText, message.kind, body);
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment