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
41bbf653
Commit
41bbf653
authored
Jan 28, 2018
by
Seve
Committed by
JC Brand
Feb 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle cases where hint is not supplied.
parent
934e5ad4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/converse-spoilers.js
src/converse-spoilers.js
+2
-2
No files found.
src/converse-spoilers.js
View file @
41bbf653
...
@@ -222,7 +222,8 @@
...
@@ -222,7 +222,8 @@
console
.
log
(
msg
);
console
.
log
(
msg
);
//Spoiler logic
//Spoiler logic
if
(
'
spoiler
'
in
attrs
)
{
//The value of the "spoiler" attribute, corresponds to the spoiler's hint.
if
(
"
spoiler
"
in
attrs
)
{
console
.
log
(
'
Spoiler in attrs
\n
'
);
console
.
log
(
'
Spoiler in attrs
\n
'
);
let
button
=
document
.
createElement
(
"
button
"
);
let
button
=
document
.
createElement
(
"
button
"
);
let
container
=
document
.
createElement
(
"
div
"
);
let
container
=
document
.
createElement
(
"
div
"
);
...
@@ -231,7 +232,6 @@
...
@@ -231,7 +232,6 @@
let
contentHidden
=
document
.
createElement
(
"
div
"
);
let
contentHidden
=
document
.
createElement
(
"
div
"
);
let
messageContent
=
msg
.
querySelector
(
"
.chat-msg-content
"
);
let
messageContent
=
msg
.
querySelector
(
"
.chat-msg-content
"
);
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
));
for
(
var
i
=
0
;
i
<
messageContent
.
childNodes
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
messageContent
.
childNodes
.
length
;
i
++
){
...
...
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