Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
2eca0e44
Commit
2eca0e44
authored
Mar 25, 2022
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't break lines manually in chat messages.
This is no longer necessary since we use "pre-wrap" in the CSS.
parent
a7ccfba4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
18 deletions
+2
-18
static/galene.js
static/galene.js
+2
-18
No files found.
static/galene.js
View file @
2eca0e44
...
...
@@ -2955,23 +2955,6 @@ function formatLine(line) {
return
result
;
}
/**
* @param {string[]} lines
* @returns {HTMLElement}
*/
function
formatLines
(
lines
)
{
let
elts
=
[];
if
(
lines
.
length
>
0
)
elts
=
formatLine
(
lines
[
0
]);
for
(
let
i
=
1
;
i
<
lines
.
length
;
i
++
)
{
elts
.
push
(
document
.
createElement
(
'
br
'
));
elts
=
elts
.
concat
(
formatLine
(
lines
[
i
]));
}
let
elt
=
document
.
createElement
(
'
p
'
);
elts
.
forEach
(
e
=>
elt
.
appendChild
(
e
));
return
elt
;
}
/**
* @param {number} time
* @returns {string}
...
...
@@ -3022,7 +3005,8 @@ function addToChatbox(peerId, dest, nick, time, privileged, history, kind, messa
container
.
classList
.
add
(
'
message-private
'
);
if
(
kind
!==
'
me
'
)
{
let
p
=
formatLines
(
message
.
toString
().
split
(
'
\n
'
));
let
p
=
document
.
createElement
(
'
p
'
);
p
.
textContent
=
message
.
toString
();
let
doHeader
=
true
;
if
(
!
peerId
&&
!
dest
&&
!
nick
)
{
doHeader
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment