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
2ca382b7
Commit
2ca382b7
authored
6 years ago
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move const declarations out of initialize method
parent
188047dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
57 deletions
+58
-57
src/converse-core.js
src/converse-core.js
+58
-57
No files found.
src/converse-core.js
View file @
2ca382b7
...
...
@@ -151,6 +151,64 @@
_converse
.
DEFAULT_IMAGE_TYPE
=
'
image/png
'
;
_converse
.
DEFAULT_IMAGE
=
"
iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAIAAABt+uBvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gwHCy455JBsggAABkJJREFUeNrtnM1PE1sUwHvvTD8otWLHST/Gimi1CEgr6M6FEWuIBo2pujDVsNDEP8GN/4MbN7oxrlipG2OCgZgYlxAbkRYw1KqkIDRCSkM7nXvvW8x7vjyNeQ9m7p1p3z1LQk/v/Dhz7vkEXL161cHl9wI5Ag6IA+KAOCAOiAPigDggLhwQB2S+iNZ+PcYY/SWEEP2HAAAIoSAIoihCCP+ngDDGtVotGAz29/cfOXJEUZSOjg6n06lp2sbGRqlUWlhYyGazS0tLbrdbEASrzgksyeYJId3d3el0uqenRxRFAAAA4KdfIIRgjD9+/Pj8+fOpqSndslofEIQwHA6Pjo4mEon//qmFhYXHjx8vLi4ihBgDEnp7e9l8E0Jo165d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RlD179ng8nh0Efgiher2+vr6ur3HMzMysrq7uTJVdACGEurq6Ll++nEgkPB7Pj9jPoDHqOxyqqubz+WfPnuVyuV9XPeyeagAAAoHArVu3BgcHab8CuVzu4cOHpVKJUnfA5GweY+xyuc6cOXPv3r1IJMLAR8iyPDw8XK/Xi8Wiqqqmm5KZgBBC7e3tN27cuHbtGuPVpf7+/lAoNDs7W61WzfVKpgHSSzw3b95MpVKW3MfRaDQSiczNzVUqFRMZmQOIEOL1eq9fv3727FlL1t50URRFluX5+flqtWpWEGAOIFEUU6nUlStXLKSjy759+xwOx9zcnKZpphzGHMzhcDiTydgk9r1w4YIp7RPTAAmCkMlk2FeLf/tIEKbTab/fbwtAhJBoNGrutpNx6e7uPnTokC1eMU3T0um0DZPMkZER6wERQnw+n/FFSxpy7Nix3bt3WwwIIcRgIWnHkkwmjecfRgGx7DtuV/r6+iwGhDHev3+/bQF1dnYaH6E2CkiWZdsC2rt3r8WAHA5HW1ubbQGZcjajgOwTH/4qNko1Wlg4IA6IA+KAOKBWBUQIsfNojyliKIoRRfH9+/dut9umf3wzpoUNNQ4BAJubmwz+ic+OxefzWWlBhJD29nbug7iT5sIBcUAcEAfEAXFAHBAHxOVn+QMrmWpuPZx12gAAAABJRU5ErkJggg==
"
;
_converse
.
TIMEOUTS
=
{
// Set as module attr so that we can override in tests.
'
PAUSED
'
:
10000
,
'
INACTIVE
'
:
90000
};
// XEP-0085 Chat states
// http://xmpp.org/extensions/xep-0085.html
_converse
.
INACTIVE
=
'
inactive
'
;
_converse
.
ACTIVE
=
'
active
'
;
_converse
.
COMPOSING
=
'
composing
'
;
_converse
.
PAUSED
=
'
paused
'
;
_converse
.
GONE
=
'
gone
'
;
// Default configuration values
// ----------------------------
_converse
.
default_settings
=
{
allow_non_roster_messaging
:
false
,
animate
:
true
,
authentication
:
'
login
'
,
// Available values are "login", "prebind", "anonymous" and "external".
auto_away
:
0
,
// Seconds after which user status is set to 'away'
auto_login
:
false
,
// Currently only used in connection with anonymous login
auto_reconnect
:
true
,
auto_xa
:
0
,
// Seconds after which user status is set to 'xa'
blacklisted_plugins
:
[],
bosh_service_url
:
undefined
,
connection_options
:
{},
credentials_url
:
null
,
// URL from where login credentials can be fetched
csi_waiting_time
:
0
,
// Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
debug
:
false
,
default_state
:
'
online
'
,
expose_rid_and_sid
:
false
,
geouri_regex
:
/https:
\/\/
www.openstreetmap.org
\/
.*#map=
[
0-9
]
+
\/([\-
0-9.
]
+
)\/([\-
0-9.
]
+
)\S
*/g
,
geouri_replacement
:
'
https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2
'
,
jid
:
undefined
,
keepalive
:
true
,
locales_url
:
'
locale/{{{locale}}}/LC_MESSAGES/converse.json
'
,
locales
:
[
'
af
'
,
'
ar
'
,
'
bg
'
,
'
ca
'
,
'
de
'
,
'
es
'
,
'
eu
'
,
'
en
'
,
'
fr
'
,
'
he
'
,
'
hu
'
,
'
id
'
,
'
it
'
,
'
ja
'
,
'
nb
'
,
'
nl
'
,
'
pl
'
,
'
pt_BR
'
,
'
ru
'
,
'
tr
'
,
'
uk
'
,
'
zh_CN
'
,
'
zh_TW
'
],
message_carbons
:
true
,
nickname
:
undefined
,
password
:
undefined
,
prebind_url
:
null
,
priority
:
0
,
rid
:
undefined
,
root
:
window
.
document
,
sid
:
undefined
,
storage
:
'
session
'
,
strict_plugin_dependencies
:
false
,
trusted
:
true
,
view_mode
:
'
overlayed
'
,
// Choices are 'overlayed', 'fullscreen', 'mobile'
websocket_url
:
undefined
,
whitelisted_plugins
:
[]
};
_converse
.
log
=
function
(
message
,
level
,
style
=
''
)
{
/* Logs messages to the browser's developer console.
*
...
...
@@ -276,63 +334,6 @@
unloadevent
=
'
unload
'
;
}
// Instance level constants
this
.
TIMEOUTS
=
{
// Set as module attr so that we can override in tests.
'
PAUSED
'
:
10000
,
'
INACTIVE
'
:
90000
};
// XEP-0085 Chat states
// http://xmpp.org/extensions/xep-0085.html
this
.
INACTIVE
=
'
inactive
'
;
this
.
ACTIVE
=
'
active
'
;
this
.
COMPOSING
=
'
composing
'
;
this
.
PAUSED
=
'
paused
'
;
this
.
GONE
=
'
gone
'
;
// Default configuration values
// ----------------------------
this
.
default_settings
=
{
allow_non_roster_messaging
:
false
,
animate
:
true
,
authentication
:
'
login
'
,
// Available values are "login", "prebind", "anonymous" and "external".
auto_away
:
0
,
// Seconds after which user status is set to 'away'
auto_login
:
false
,
// Currently only used in connection with anonymous login
auto_reconnect
:
true
,
auto_xa
:
0
,
// Seconds after which user status is set to 'xa'
blacklisted_plugins
:
[],
bosh_service_url
:
undefined
,
connection_options
:
{},
credentials_url
:
null
,
// URL from where login credentials can be fetched
csi_waiting_time
:
0
,
// Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
debug
:
false
,
default_state
:
'
online
'
,
expose_rid_and_sid
:
false
,
geouri_regex
:
/https:
\/\/
www.openstreetmap.org
\/
.*#map=
[
0-9
]
+
\/([\-
0-9.
]
+
)\/([\-
0-9.
]
+
)\S
*/g
,
geouri_replacement
:
'
https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2
'
,
jid
:
undefined
,
keepalive
:
true
,
locales_url
:
'
locale/{{{locale}}}/LC_MESSAGES/converse.json
'
,
locales
:
[
'
af
'
,
'
ar
'
,
'
bg
'
,
'
ca
'
,
'
de
'
,
'
es
'
,
'
eu
'
,
'
en
'
,
'
fr
'
,
'
he
'
,
'
hu
'
,
'
id
'
,
'
it
'
,
'
ja
'
,
'
nb
'
,
'
nl
'
,
'
pl
'
,
'
pt_BR
'
,
'
ru
'
,
'
tr
'
,
'
uk
'
,
'
zh_CN
'
,
'
zh_TW
'
],
message_carbons
:
true
,
nickname
:
undefined
,
password
:
undefined
,
prebind_url
:
null
,
priority
:
0
,
rid
:
undefined
,
root
:
window
.
document
,
sid
:
undefined
,
storage
:
'
session
'
,
strict_plugin_dependencies
:
false
,
trusted
:
true
,
view_mode
:
'
overlayed
'
,
// Choices are 'overlayed', 'fullscreen', 'mobile'
websocket_url
:
undefined
,
whitelisted_plugins
:
[]
};
_
.
assignIn
(
this
,
this
.
default_settings
);
// Allow only whitelisted configuration attributes to be overwritten
_
.
assignIn
(
this
,
_
.
pick
(
settings
,
_
.
keys
(
this
.
default_settings
)));
...
...
This diff is collapsed.
Click to expand it.
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