From 0cfb86eff0cadce2e79599a13e0a5ad43fb38933 Mon Sep 17 00:00:00 2001 From: Pavol Babincak Date: Sun, 10 Feb 2013 15:29:27 +0100 Subject: [PATCH 1/3] Use invisible formatting for clipboard copy-paste When text is copied from browser it looks like "00:00 text." Firefox adds new lines between records. It would be good to get rid of it. --- code/chat.js | 2 +- style.css | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/chat.js b/code/chat.js index eb4b2b81..87399417 100644 --- a/code/chat.js +++ b/code/chat.js @@ -456,7 +456,7 @@ window.chat.renderMsg = function(msg, nick, time, team) { var t = ''; var s = 'style="color:'+COLORS[team]+'"'; var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : ''; - return '

'+t+''+nick+''+msg+'

'; + return '

'+t+' <'+nick+'> '+msg+'

'; } diff --git a/style.css b/style.css index eebbc734..6ce0e51a 100644 --- a/style.css +++ b/style.css @@ -195,7 +195,7 @@ summary { width: 683px; } -#chat span { +#chat .blockquote { display: inline-block; width: 540px; } @@ -212,6 +212,11 @@ summary { z-index: 3001; } +#chat .invisibleseparator { + color: rgba(8, 48, 78, 0.0); + display: inline-block; + width: 0px; +} #chatinput span { From 7e6c8019764bcd27e5ab76d0d8704337f2cf5b05 Mon Sep 17 00:00:00 2001 From: Pavol Babincak Date: Sun, 10 Feb 2013 19:04:47 +0100 Subject: [PATCH 2/3] CSS for clipboard-aware chat modified to be backwards compatible --- style.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/style.css b/style.css index 6ce0e51a..0fd56217 100644 --- a/style.css +++ b/style.css @@ -195,7 +195,7 @@ summary { width: 683px; } -#chat .blockquote { +#chat span { display: inline-block; width: 540px; } @@ -214,7 +214,6 @@ summary { #chat .invisibleseparator { color: rgba(8, 48, 78, 0.0); - display: inline-block; width: 0px; } From c66bc0f17165e13d721f50e655fc1361438d70b6 Mon Sep 17 00:00:00 2001 From: Pavol Babincak Date: Sun, 10 Feb 2013 19:22:35 +0100 Subject: [PATCH 3/3] Hide elements used only for clipboard & removed unused selector --- code/chat.js | 2 +- style.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/chat.js b/code/chat.js index 87399417..4217bb32 100644 --- a/code/chat.js +++ b/code/chat.js @@ -456,7 +456,7 @@ window.chat.renderMsg = function(msg, nick, time, team) { var t = ''; var s = 'style="color:'+COLORS[team]+'"'; var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : ''; - return '

'+t+' <'+nick+'> '+msg+'

'; + return '

'+t+' <'+nick+'> '+msg+'

'; } diff --git a/style.css b/style.css index 0fd56217..d271b4c4 100644 --- a/style.css +++ b/style.css @@ -214,6 +214,7 @@ summary { #chat .invisibleseparator { color: rgba(8, 48, 78, 0.0); + overflow: hidden; width: 0px; }