Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
934e5ad4
Commit
934e5ad4
authored
Jan 28, 2018
by
Seve
Committed by
JC Brand
Feb 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display images inside spoilers. Emojis not handled properly
parent
1a1a7a4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/converse-spoilers.js
src/converse-spoilers.js
+8
-2
No files found.
src/converse-spoilers.js
View file @
934e5ad4
...
@@ -229,11 +229,14 @@
...
@@ -229,11 +229,14 @@
let
content
=
document
.
createElement
(
"
div
"
);
let
content
=
document
.
createElement
(
"
div
"
);
let
hint
=
document
.
createElement
(
"
div
"
);
let
hint
=
document
.
createElement
(
"
div
"
);
let
contentHidden
=
document
.
createElement
(
"
div
"
);
let
contentHidden
=
document
.
createElement
(
"
div
"
);
let
messageContent
=
msg
.
querySelector
(
"
.chat-msg-content
"
);
attrs
.
spoiler
=
attrs
.
spoiler
==
true
?
_
(
'
Spoiler
'
)
:
attrs
.
spoiler
;
//Check if attrs.spoiler can be true
attrs
.
spoiler
=
attrs
.
spoiler
==
true
?
_
(
'
Spoiler
'
)
:
attrs
.
spoiler
;
//Check if attrs.spoiler can be true
hint
.
appendChild
(
document
.
createTextNode
(
attrs
.
spoiler
));
hint
.
appendChild
(
document
.
createTextNode
(
attrs
.
spoiler
));
contentHidden
.
appendChild
(
document
.
createTextNode
(
msg
.
message
));
for
(
var
i
=
0
;
i
<
messageContent
.
childNodes
.
length
;
i
++
){
contentHidden
.
append
(
messageContent
.
childNodes
[
i
]);
}
contentHidden
.
classList
.
add
(
"
hidden
"
);
contentHidden
.
classList
.
add
(
"
hidden
"
);
// contentHidden.addHyperlinks();
// contentHidden.addHyperlinks();
// contentHidden.addEmoticons(_converse.visible_toolbar_buttons.emoticons);
// contentHidden.addEmoticons(_converse.visible_toolbar_buttons.emoticons);
...
@@ -258,7 +261,10 @@
...
@@ -258,7 +261,10 @@
console
.
log
(
'
And this is the container:
\n
'
);
console
.
log
(
'
And this is the container:
\n
'
);
console
.
log
(
container
);
console
.
log
(
container
);
msg
.
append
(
container
);
messageContent
.
textContent
=
""
;
messageContent
.
append
(
document
.
createElement
(
"
br
"
));
messageContent
.
append
(
container
);
}
}
return
msg
;
return
msg
;
...
...
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