Browse Source

add rewrite_send_local

Andrew Dolgov 5 years ago
parent
commit
8bbc8d1e7c
2 changed files with 18 additions and 9 deletions
  1. 6 1
      js/tt-irc.js
  2. 12 8
      themes/solarized/theme.css

+ 6 - 1
js/tt-irc.js

@@ -960,7 +960,12 @@ function send(elem, evt) {
 				model.activeChannel().lines.removeAll();
 
 			} else {
-				var query = "op=send&message=" + param_escape(elem.value) +
+				var message = elem.value;
+
+				if (typeof rewrite_send_local != "undefined")
+					message = rewrite_send_local(message);
+
+				var query = "op=send&message=" + param_escape(message) +
 					"&chan=" + param_escape(channel) +
 					"&connection=" + param_escape(tab.getAttribute("connection_id")) +
 					"&last_id=" + last_id + "&tab_type=" + tab.getAttribute("tab_type");

+ 12 - 8
themes/solarized/theme.css

@@ -3,12 +3,12 @@ body.main div#content #topic-input-real,
 body.main div#content #input-prompt,
 body.main div#content #topic-input {
 	background : #002B38;
-	color : #EEE8D5;
+	color : #839496;
 }
 
 body.main button.btn,
 body.main #emoticon-prompt {
-	background : #157CD2;
+	background : #268BD2;
 	color : #EEE8D5;
 	border : 1px solid #073642;
 	box-shadow : none;
@@ -16,7 +16,7 @@ body.main #emoticon-prompt {
 }
 
 body.main div#header { 
-	color : #EEE8D5;
+	color : #839496;
 	font-style : italic;
 }
 
@@ -34,7 +34,7 @@ body.main div#log span.message a:visited {
 }
 
 body.main div#log span.message {
-	color : #EEE8D5;
+	color : #839496;
 }
 
 body.main div#log span.sys-message {
@@ -70,12 +70,12 @@ body.main #userlist span.user-img.op {
 
 body.main #nick,
 body.main ul#tabs-list li {
-	color : #EEE8D5;
+	color : #839496;
 }
 
 body.main #input-prompt,
 body.main div#topic #topic-input {
-	color : #EEE8D5;
+	color : #839496;
 	border-color : #0A5163;
 }
 
@@ -102,7 +102,7 @@ body.main div#content {
 body.main div#log {
 	background : #002B38;
 	font-family : consolas, monospace;
-	color : #EEE8D5;
+	color : #839496;
 	border-color : #0A5163;
 	border-radius : 0px;
 }
@@ -113,10 +113,14 @@ body.main div#log .row:nth-child(even), .row:nth-child(even) td {
 
 body.main div#log .row.HL, body.main div#log .row.HL:nth-child(even) {
 	background-color : #073642;
-	color : #EEE8D5;
+	color : #839496;
 	border-color : #073642;
 }
 
+body.main div#log .row .timestamp {
+	color : #268BD2;
+}
+
 body.main div#log .row.HL .message {
 	color : #CB4B16;
 }