Browse Source

Templates!

Nathaniel van Diepen 11 years ago
parent
commit
994df938e8
1 changed files with 8 additions and 1 deletions
  1. 8 1
      app/www/js/omnomirc.js

+ 8 - 1
app/www/js/omnomirc.js

@@ -318,7 +318,8 @@
 		pluginSandbox = {
 			$: window.jQuery,
 			jQuery: window.jQuery,
-			$o: $o
+			$o: window.OmnomIRC,
+			OmnomIRC: window.OmnomIRC
 		},
 		currentPlugin = 0,
 		Sandbox = function(sandbox){
@@ -696,6 +697,12 @@
 					}
 				}
 			},
+			templates: {
+				user: '($origin) <$name>',
+				timestamp: '[<abbr class="date" title="$time">$time</abbr>]',
+				message: '$message',
+				line: '<span class="cell date_cell">{timestamp}</span><span class="cell">{user}	{message}</span>'
+			},
 			tabs: {
 				add: function(name){
 					event('Tab added: '+name);