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
f73ab4e8
Commit
f73ab4e8
authored
Nov 16, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow otr and CryptoJS to not be defined.
Will allow builds without OTR functionality.
parent
a3821fd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
converse.js
converse.js
+11
-2
No files found.
converse.js
View file @
f73ab4e8
...
...
@@ -29,7 +29,11 @@
evaluate
:
/
\{\[([\s\S]
+
?)\]\}
/g
,
interpolate
:
/
\{\{([\s\S]
+
?)\}\}
/g
};
return
factory
(
jQuery
,
_
,
CryptoJS
,
otr
.
OTR
,
otr
.
DSA
,
console
);
if
(
typeof
otr
!==
"
undefined
"
)
{
return
factory
(
jQuery
,
_
,
CryptoJS
,
otr
.
OTR
,
otr
.
DSA
,
console
);
}
else
{
return
factory
(
jQuery
,
_
,
undefined
,
undefined
,
undefined
,
console
);
}
});
}
else
{
// Browser globals
...
...
@@ -57,6 +61,11 @@
(
typeof
crypto
.
randomBytes
!==
'
function
'
)
&&
(
typeof
crypto
.
getRandomValues
!==
'
function
'
)
));
var
HAS_CRYPTO
=
HAS_CSPRNG
&&
(
(
typeof
CryptoJS
!==
"
undefined
"
)
&&
(
typeof
OTR
!==
"
undefined
"
)
&&
(
typeof
DSA
!==
"
undefined
"
)
);
// Default configuration values
// ----------------------------
...
...
@@ -109,7 +118,7 @@
]));
// Only allow OTR if we have the capability
this
.
allow_otr
=
this
.
allow_otr
&&
HAS_C
SPRNG
;
this
.
allow_otr
=
this
.
allow_otr
&&
HAS_C
RYPTO
;
// Translation machinery
// ---------------------
...
...
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