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
9e8c034b
Commit
9e8c034b
authored
Aug 16, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle cases where Jed and/or Strophe.disco aren't available
parent
56c5a9c8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
src/converse-ping.js
src/converse-ping.js
+3
-1
src/utils.js
src/utils.js
+5
-2
No files found.
src/converse-ping.js
View file @
9e8c034b
...
@@ -56,7 +56,9 @@
...
@@ -56,7 +56,9 @@
};
};
_converse
.
registerPongHandler
=
function
()
{
_converse
.
registerPongHandler
=
function
()
{
if
(
!
_
.
isUndefined
(
_converse
.
connection
.
disco
))
{
_converse
.
connection
.
disco
.
addFeature
(
Strophe
.
NS
.
PING
);
_converse
.
connection
.
disco
.
addFeature
(
Strophe
.
NS
.
PING
);
}
_converse
.
connection
.
ping
.
addPingHandler
(
_converse
.
pong
);
_converse
.
connection
.
ping
.
addPingHandler
(
_converse
.
pong
);
};
};
...
...
src/utils.js
View file @
9e8c034b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
// Licensed under the Mozilla Public License (MPLv2)
//
//
/*global define, escape, locales,
Jed
*/
/*global define, escape, locales,
window
*/
(
function
(
root
,
factory
)
{
(
function
(
root
,
factory
)
{
define
([
define
([
"
sizzle
"
,
"
sizzle
"
,
...
@@ -86,8 +86,11 @@
...
@@ -86,8 +86,11 @@
// Translation machinery
// Translation machinery
// ---------------------
// ---------------------
u
.
__
=
function
(
str
)
{
u
.
__
=
function
(
str
)
{
if
(
_
.
isUndefined
(
window
.
Jed
))
{
return
str
;
}
if
(
!
u
.
isConverseLocale
(
this
.
locale
)
||
this
.
locale
===
'
en
'
)
{
if
(
!
u
.
isConverseLocale
(
this
.
locale
)
||
this
.
locale
===
'
en
'
)
{
return
Jed
.
sprintf
.
apply
(
Jed
,
arguments
);
return
Jed
.
sprintf
.
apply
(
window
.
Jed
,
arguments
);
}
}
if
(
typeof
this
.
jed
===
"
undefined
"
)
{
if
(
typeof
this
.
jed
===
"
undefined
"
)
{
this
.
jed
=
new
Jed
(
window
.
JSON
.
parse
(
locales
[
this
.
locale
]));
this
.
jed
=
new
Jed
(
window
.
JSON
.
parse
(
locales
[
this
.
locale
]));
...
...
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