Created
January 20, 2011 21:43
-
-
Save adelcambre/788740 to your computer and use it in GitHub Desktop.
make messages containing *green* green and containing *red* red in Propane
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://gist.github.com/raw/788740/4b337df4be4be4338e2466ef775cd685b57d9601/gistfile1.diff | patch -p0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /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