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
3d7f5eda
Commit
3d7f5eda
authored
Jul 10, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some explanatory comments
parent
4f87fa3c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
16 deletions
+30
-16
converse.js
converse.js
+30
-16
No files found.
converse.js
View file @
3d7f5eda
/*!
// Converse.js (A browser based XMPP chat client)
* Converse.js (Web-based XMPP instant messaging client)
// http://conversejs.org
* http://conversejs.org
//
*
// Copyright (c) 2012-2015, Jan-Carel Brand <jc@opkode.com>
* Copyright (c) 2012, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
* Licensed under the Mozilla Public License (MPL)
*/
// AMD/global registrations
(
function
(
root
,
factory
)
{
(
function
(
root
,
factory
)
{
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
// AMD module loading
// ------------------
// When using require.js, two modules are loaded as dependencies.
//
// * **converse-dependencies**: A list of dependencies on which converse.js
// depends. The path to this module is in main.js and the module itself can
//
// * **converse-templates**: The HTML templates used by converse.js.
//
// The dependencies are then split up and passed into the factory function, which
// contains and instantiates converse.js.
define
(
"
converse
"
,
define
(
"
converse
"
,
[
"
converse-dependencies
"
,
"
converse-templates
"
],
[
"
converse-dependencies
"
,
"
converse-templates
"
],
function
(
dependencies
,
templates
)
{
function
(
dependencies
,
templates
)
{
...
@@ -30,20 +38,26 @@
...
@@ -30,20 +38,26 @@
}
}
);
);
}
else
{
}
else
{
// When not using a module loader
// -------------------------------
// In this case, the dependencies need to be available already as
// global variables, and should be loaded separately via *script* tags.
// See the file **non_amd.html** for an example of this usecase.
root
.
converse
=
factory
(
templates
,
jQuery
,
$iq
,
$msg
,
$pres
,
$build
,
DSA
,
OTR
,
Strophe
,
_
,
moment
,
utils
,
b64_sha1
);
root
.
converse
=
factory
(
templates
,
jQuery
,
$iq
,
$msg
,
$pres
,
$build
,
DSA
,
OTR
,
Strophe
,
_
,
moment
,
utils
,
b64_sha1
);
}
}
}(
this
,
function
(
templates
,
$
,
$iq
,
$msg
,
$pres
,
$build
,
DSA
,
OTR
,
Strophe
,
_
,
moment
,
utils
,
b64_sha1
)
{
}(
this
,
function
(
templates
,
$
,
$iq
,
$msg
,
$pres
,
$build
,
DSA
,
OTR
,
Strophe
,
_
,
moment
,
utils
,
b64_sha1
)
{
// "use strict";
/* "use strict";
// Cannot use this due to Safari bug.
* Cannot use this due to Safari bug.
// See https://github.com/jcbrand/converse.js/issues/196
* See https://github.com/jcbrand/converse.js/issues/196
*/
if
(
typeof
console
===
"
undefined
"
||
typeof
console
.
log
===
"
undefined
"
)
{
if
(
typeof
console
===
"
undefined
"
||
typeof
console
.
log
===
"
undefined
"
)
{
console
=
{
log
:
function
()
{},
error
:
function
()
{}
};
console
=
{
log
:
function
()
{},
error
:
function
()
{}
};
}
}
// Configuration of underscore templates (this config is distict to the
// config of requirejs-tpl in main.js). This one is for normal inline
// templates.
// Use Mustache style syntax for variable interpolation
// Use Mustache style syntax for variable interpolation
/* Configuration of underscore templates (this config is distinct to the
* config of requirejs-tpl in main.js). This one is for normal inline templates.
*/
_
.
templateSettings
=
{
_
.
templateSettings
=
{
evaluate
:
/
\{\[([\s\S]
+
?)\]\}
/g
,
evaluate
:
/
\{\[([\s\S]
+
?)\]\}
/g
,
interpolate
:
/
\{\{([\s\S]
+
?)\}\}
/g
interpolate
:
/
\{\{([\s\S]
+
?)\}\}
/g
...
...
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