Comparar commits
119 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| da3b092628 | |||
| 46bab87c9a | |||
| 2f2924eba3 | |||
| 7d563d7c91 | |||
| f7c7f6c26f | |||
| c25195a8e4 | |||
| 60ed6299ce | |||
| 00c9bda017 | |||
| 764eb2230a | |||
| 8f0bc35e87 | |||
| b34dbb3238 | |||
| e098951454 | |||
| 5cb76e748b | |||
| 8f318182fb | |||
| 5ead597881 | |||
| 14e7cdc537 | |||
| 1d9443f32d | |||
| 135db545c6 | |||
| 6a8d3f2e50 | |||
| e6b699a123 | |||
| 689e868266 | |||
| 94bfb84562 | |||
| 7e4885b86d | |||
| e8357cb3e8 | |||
| 990dfa5de0 | |||
| ab2a713a29 | |||
| 9ad183210d | |||
| fdf9b670f3 | |||
| 0227f54c8b | |||
| 26d5599ab1 | |||
| c785e8dbdd | |||
| 3c881a4b50 | |||
| 4644d79bb4 | |||
| a8fb7a2e50 | |||
| e1c905586f | |||
| 84c3fbbd44 | |||
| 5bd440ead9 | |||
| ebe6b7bfea | |||
| 50693eece7 | |||
| e8ae2d5421 | |||
| 9c3bfcda07 | |||
| fdc570b6ee | |||
| 6ff2a7ce31 | |||
| 6687eaa66c | |||
| 895cae067c | |||
| b0b3245e4e | |||
| 8f58a939fb | |||
| 068f60c64e | |||
| 240a257397 | |||
| bca7af73ec | |||
| 62f6ddbfbe | |||
| fa831e25ca | |||
| 3e7633d2c8 | |||
| 92e38a8abb | |||
| 7765b6b46f | |||
| d675401bc8 | |||
| 16e519d5ec | |||
| 62ca260ba3 | |||
| f1a83cd696 | |||
| 3d97567429 | |||
| 3226a3c940 | |||
| 31eba50c99 | |||
| ec0cec8a9e | |||
| 15c7948cb8 | |||
| 52588a1437 | |||
| 1d60187f98 | |||
| 81d84a02b9 | |||
| 2eb4dfdea2 | |||
| 0aa0d4d467 | |||
| f544b8d753 | |||
| 60afa8efeb | |||
| 413bfd8dc3 | |||
| 964de1637c | |||
| 684bd5b27a | |||
| 2cbc5b74a3 | |||
| 66a1ed906c | |||
| 55838a4724 | |||
| c8b6a7b1ba | |||
| d45a5e1fda | |||
| 95689c62b6 | |||
| 0f2960b1fb | |||
| 7552e5c73a | |||
| a6de6d6843 | |||
| eeab8355e5 | |||
| e95f61af25 | |||
| 4ec0656de6 | |||
| 687347ec09 | |||
| ace5fc585b | |||
| d38b45c441 | |||
| 3d408a51b9 | |||
| 78cb8426c3 | |||
| daa5d35d7a | |||
| daf6217a63 | |||
| 479ebb3a26 | |||
| 4961e7e8e7 | |||
| 2b8c103653 | |||
| 7a695ea639 | |||
| 4caed440fd | |||
| c7cd3cdd43 | |||
| b7f4780d53 | |||
| 25f9675d61 | |||
| 36e38129ca | |||
| 0f136e9d7a | |||
| beb4962f90 | |||
| 755f2d7d31 | |||
| 11e4be5a9b | |||
| 4df99eeb22 | |||
| 9bdfb8b81b | |||
| b35cd25354 | |||
| e5b7bc675d | |||
| e953303002 | |||
| 99d6393c8c | |||
| 6b75447fee | |||
| f9c522b571 | |||
| 54eea0f89b | |||
| 386a875fdf | |||
| 8c5b63fd99 | |||
| e302463bf4 | |||
| a1226d9740 |
+4
-1
@@ -9,7 +9,7 @@ dev/
|
||||
*~
|
||||
/tmp/
|
||||
/lib/favico.js/
|
||||
/lib/strophe.bookmarks/
|
||||
/lib/strophe.bookmarks
|
||||
/lib/strophe.chatstates/
|
||||
/lib/strophe.x/
|
||||
/lib/almond/
|
||||
@@ -25,3 +25,6 @@ lib/i18next/
|
||||
lib/jquery-i18next/
|
||||
lib/magnific-popup/
|
||||
.idea
|
||||
/lib/strophejs-plugin-mam
|
||||
/lib/strophejs-plugin-rsm
|
||||
.github.json
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@
|
||||
url = https://github.com/twbs/bootstrap-sass/
|
||||
[submodule "lib/strophe.jinglejs"]
|
||||
path = lib/strophe.jinglejs
|
||||
url = https://github.com/sualko/strophe.jinglejs
|
||||
url = https://github.com/jsxc/strophe.jinglejs
|
||||
|
||||
@@ -8,4 +8,5 @@ before_install:
|
||||
- gem install scss_lint
|
||||
|
||||
script:
|
||||
- echo {} > .github.json
|
||||
- ./node_modules/.bin/grunt pre-commit
|
||||
|
||||
+135
-65
@@ -5,42 +5,113 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## 3.2.1 - 2017-06-01
|
||||
### Added
|
||||
- add Greek translation
|
||||
|
||||
### Fixed
|
||||
- fix thumbnail transfer
|
||||
- fix handler for muc menu items
|
||||
- catch undefined exception during file transfer
|
||||
- fix disabled file transfer link
|
||||
- [#542](https://github.com/jsxc/jsxc/issues/542) fix fallback language
|
||||
- remove favicon badge after logout
|
||||
|
||||
### Changed
|
||||
- reduce thumbnail size
|
||||
- enable http upload for muc
|
||||
- disable links in last message view
|
||||
|
||||
## 3.2.0 - 2017-05-17
|
||||
### Added
|
||||
- [#150](https://github.com/jsxc/jsxc/issues/150) add Message Archive Management (XEP-0313)
|
||||
- [#464](https://github.com/jsxc/jsxc/issues/464) respond to software version request (XEP-0092)
|
||||
|
||||
### Fixed
|
||||
- [#447](https://github.com/jsxc/jsxc/pull/447) fix muc member presence
|
||||
- fix http upload discovery
|
||||
- fix vcard retrieval for rooms
|
||||
- fix bookmarks
|
||||
- [#470](https://github.com/jsxc/jsxc/issues/470) fix receiving message from unknown sender
|
||||
- [#483](https://github.com/jsxc/jsxc/issues/483) fix unclickable space
|
||||
- catch quota exceeded errors (e.g. Safari in private mode has a quota of 0)
|
||||
- [#510](https://github.com/jsxc/jsxc/pull/510) fix muc form
|
||||
- [#505](https://github.com/jsxc/jsxc/pull/505) fix i18n key
|
||||
- [#515](https://github.com/jsxc/jsxc/issues/515) fix add contact in slave tab
|
||||
- fix initial roster loading
|
||||
- fix xmpp message uri to unknown jid
|
||||
- fix uri scheme handling if offline
|
||||
- fix hiding of offline users in roster
|
||||
|
||||
### Changed
|
||||
- update dependencies
|
||||
- strophe.jinglejs
|
||||
- grunt-contrib-clean
|
||||
- grunt-contrib-uglify
|
||||
- node-sass
|
||||
- strophe.chatstates
|
||||
- strophejs-plugin-mam
|
||||
- make max file size optional for http upload service
|
||||
- [#480](https://github.com/jsxc/jsxc/issues/480) split avatar loading into chunks
|
||||
- [#478](https://github.com/jsxc/jsxc/issues/478) support roster versioning
|
||||
- prefer xmpp password from settings over login form
|
||||
- [#468](https://github.com/jsxc/jsxc/issues/468) move composing message to window header
|
||||
- make message error more visible
|
||||
- ignore message errors without id
|
||||
- add data-bid to xmpp uris
|
||||
- add roster state to roster ready event
|
||||
|
||||
## 3.1.1 - 2017-02-14
|
||||
### Fixed
|
||||
- fix path to dependencies
|
||||
|
||||
## 3.1.0 - 2017-02-14
|
||||
### Added
|
||||
- add application states
|
||||
- #393 add the me command (XEP-0245)
|
||||
- #422 add multiline message support
|
||||
- #431 add Chat State Notifications (XEP-0085)
|
||||
- #426 add HTTP File Upload (XEP-0363)
|
||||
- [#393](https://github.com/jsxc/jsxc/issues/393) add the /me command (XEP-0245)
|
||||
- [#422](https://github.com/jsxc/jsxc/issues/422) add multiline message support
|
||||
- [#431](https://github.com/jsxc/jsxc/issues/431) add Chat State Notifications (XEP-0085)
|
||||
- [#426](https://github.com/jsxc/jsxc/issues/426) add HTTP File Upload (XEP-0363)
|
||||
- add Turkish
|
||||
- #438 add desktop sharing
|
||||
- add nextcloud emoticon
|
||||
- #301 add close all button for notices
|
||||
- #344 support messages of type headline
|
||||
- [#438](https://github.com/jsxc/jsxc/issues/438) add desktop sharing
|
||||
- add Nextcloud emoticon
|
||||
- [#301](https://github.com/jsxc/jsxc/issues/301) add close all button for notices
|
||||
- [#344](https://github.com/jsxc/jsxc/issues/344) support messages of type `headline`
|
||||
- add icon to notices
|
||||
|
||||
### Fixed
|
||||
- fix login form submission
|
||||
- fix display of muc warning
|
||||
- #391 fix muc initialisation after relogin
|
||||
- #394 disable otr for muc conversations
|
||||
- #399 prompt for muc password if required
|
||||
- #435 fix list of user name suggestions
|
||||
- #433 fix i18n interpolation pattern
|
||||
- fix minor webrtc issues
|
||||
- #440 prevent login form submission
|
||||
- #441 remove console.trace
|
||||
- #409 fix presence after accepting contact request
|
||||
- fix display of MUC warning
|
||||
- [#391](https://github.com/jsxc/jsxc/issues/391) fix MUC initialisation after relogin
|
||||
- [#394](https://github.com/jsxc/jsxc/issues/394) disable OTR for MUC conversations
|
||||
- [#399](https://github.com/jsxc/jsxc/issues/399) prompt for MUC password if required
|
||||
- [#435](https://github.com/jsxc/jsxc/issues/435) fix list of user name suggestions
|
||||
- [#433](https://github.com/jsxc/jsxc/issues/433) fix i18n interpolation pattern
|
||||
- fix minor WebRTC issues
|
||||
- [#440](https://github.com/jsxc/jsxc/issues/440) prevent original login form submission
|
||||
- [#441](https://github.com/jsxc/jsxc/issues/441) remove console.trace
|
||||
- [#409](https://github.com/jsxc/jsxc/issues/409) fix presence after accepting contact request
|
||||
- fix template system
|
||||
- fix path to strophe.bookmarks (regression)
|
||||
- fix disabled login form
|
||||
- fix carbon copy impersonation vulnerability ([CVE-2017-5589+](https://rt-solutions.de/en/2017/02/CVE-2017-5589_xmpp_carbons/))
|
||||
- ignore malicious roster updates (similar to [CVE-2014-0364](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0364))
|
||||
- prevent double insertion of MUC setting
|
||||
|
||||
### Changed
|
||||
- update dependencies
|
||||
- #385 update i18next
|
||||
- [#385](https://github.com/jsxc/jsxc/issues/385) update i18next
|
||||
- improve initial focus for login box
|
||||
- add large emoticons
|
||||
- #421 make muc server field editable
|
||||
- [#421](https://github.com/jsxc/jsxc/issues/421) make MUC server field editable
|
||||
- system message style
|
||||
- disable sending of otr whitespace tag by default
|
||||
- disable sending of OTR whitespace tag by default
|
||||
- enable carbon copies by default
|
||||
- remove border radius from dialog
|
||||
- exclude dev dependencies from build
|
||||
- move jquery library to example folder
|
||||
- omit unreadable OTR messages
|
||||
|
||||
## 3.0.1 - 2016-10-28
|
||||
### Added
|
||||
@@ -72,15 +143,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- new video call interface
|
||||
- status usable for daltonian
|
||||
- use css for animations
|
||||
- file transfer via webrtc
|
||||
- file transfer via WebRTC
|
||||
- previews
|
||||
- show progress
|
||||
- use local date and time format
|
||||
- add no-video-call-possible icon
|
||||
- add disabled otr icon
|
||||
- add disabled OTR icon
|
||||
- add padlock icon to message
|
||||
- display line breaks in chat messages
|
||||
- hide avatar for connected messages (muc)
|
||||
- hide avatar for connected messages (MUC)
|
||||
- auto approve incoming contact request (if contact is already in our roster)
|
||||
|
||||
### Fixed
|
||||
@@ -110,7 +181,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 2.1.5 - 2015-11-17
|
||||
- Reset TURN credentials on login
|
||||
- Fix ie<11 textfield
|
||||
- Fix IE<11 textfield
|
||||
|
||||
## 2.1.4 - 2015-09-10
|
||||
- remove leading at sign from comments in build file
|
||||
@@ -123,10 +194,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- update grunt-sass (fix invalid css)
|
||||
|
||||
## 2.1.1 - 2015-08-10
|
||||
- update strophe.jingle (fix login with safari and older versions of ie, ff, chrome)
|
||||
- update strophe.jingle (fix login with Safari and older versions of IE, FF, Chrome)
|
||||
- update favico.js
|
||||
- fix undefined error variable in ie
|
||||
- fix handling of escaped jids (e.g. used in transports)
|
||||
- fix undefined error variable in IE
|
||||
- fix handling of escaped JIDs (e.g. used in transports)
|
||||
- fix placeholder replacement
|
||||
- rearrange bootstrap import
|
||||
- add option for custom online user manual
|
||||
@@ -141,8 +212,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- make dialog responsive
|
||||
- allow messages to persons without valid friendship
|
||||
- replace video library for more stable connection
|
||||
- fix dsa key generation in chrome > 42
|
||||
- fix minor roster ui issues
|
||||
- fix DSA key generation in Chrome > 42
|
||||
- fix minor roster UI issues
|
||||
|
||||
- add jsbeautifier and prettysass
|
||||
- improve example
|
||||
@@ -161,11 +232,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
## 2.0.1 - 2015-05-23
|
||||
- improve login box
|
||||
- fix browsers without CSPRNG generator
|
||||
- fix ajax login after credential failure
|
||||
- fix some webrtc issues
|
||||
- fix AJAX login after credential failure
|
||||
- fix some WebRTC issues
|
||||
- fix login with different username after dirty logout
|
||||
- remove ie (<11) gradient
|
||||
- remove broken mitm detection
|
||||
- remove IE (<11) gradient
|
||||
- remove broken MITM detection
|
||||
- fix temporary template 404
|
||||
- fix login option
|
||||
- add connecting event
|
||||
@@ -179,7 +250,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- use user avatar as notification icon
|
||||
- show notifications if tabs has no focus
|
||||
- split files into namespaces
|
||||
- sass improvements
|
||||
- SASS improvements
|
||||
- replace own translation engine with i18next
|
||||
- fix login from login box
|
||||
- fix selection of chat messages
|
||||
@@ -190,16 +261,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- fix logout
|
||||
|
||||
## 1.1.0a - 2015-02-25
|
||||
- fix css url path
|
||||
- fix CSS URL path
|
||||
|
||||
## 1.1.0 - 2015-01-08
|
||||
- move from plain css to sass
|
||||
- show avatar also by EXTVAL (url), not only by BINVAL
|
||||
- move from plain CSS to SASS
|
||||
- show avatar also by EXTVAL (URL), not only by BINVAL
|
||||
- add XEP-0280 (Message Carbons)
|
||||
- add XEP-0297 (Stanza Forwarding)
|
||||
- add option to disable otr
|
||||
- add option to disable OTR
|
||||
- add timestamp to messages
|
||||
- add ajax/prebind login
|
||||
- add AJAX/prebind login
|
||||
- fix offline subscription request
|
||||
- fix hide offline contacts
|
||||
- fix error with multiple own resources
|
||||
@@ -214,37 +285,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- add resizable function to chat window
|
||||
- add vertical scrollbar to window list
|
||||
- add call information to chat window
|
||||
- add concatinated and uglified files
|
||||
- add concatenated and uglified files
|
||||
- add translations
|
||||
- minor video call improvements
|
||||
- minor style improvements
|
||||
- generate dsa key complete in background
|
||||
- generate DSA key complete in background
|
||||
- update caps node property to jsxc.org
|
||||
- update strophe.jingle
|
||||
- update otr
|
||||
- update OTR
|
||||
- fix wrong avatars
|
||||
- fix minor message delivery errors
|
||||
- fix ff snapshot security error
|
||||
- fix FF snapshot security error
|
||||
- fix case sensitive resource handling
|
||||
- fix non-square avatars
|
||||
- fix several video issues
|
||||
- fix messages from unknown (not in roster) jid
|
||||
- fix vcard retrieval from unknown (not in roster) jid
|
||||
- fix vcard in second tab
|
||||
- fix jids with non-word characters (replace user identifier)
|
||||
- fix vCard retrieval from unknown (not in roster) jid
|
||||
- fix vCard in second tab
|
||||
- fix JIDs with non-word characters (replace user identifier)
|
||||
- improve video window design
|
||||
- improve user info
|
||||
- improve login box
|
||||
- improve smp user interaction
|
||||
- improve SMP user interaction
|
||||
- improve notifications (sync sound/message, icon)
|
||||
- minor chat window improvements
|
||||
- detect email in message
|
||||
- detect uri scheme in message
|
||||
- detect URI scheme in message
|
||||
- end all private conversations on logout
|
||||
- remove email pattern from contact dialog
|
||||
- disable video on second tab
|
||||
- add/require disco dtls feature for webrtc
|
||||
- move emoticons to css
|
||||
- add/require DISCO DTLS feature for WebRTC
|
||||
- move emoticons to CSS
|
||||
- handle loadSettings failure
|
||||
- change cursor for some elements
|
||||
- prevent event bubbling for dialog
|
||||
@@ -270,15 +341,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- new chat window design
|
||||
- enhanced roster design
|
||||
- fix emoticon replacement (XEP-0038)
|
||||
- fix some ui issues (explanations,...)
|
||||
- fix some UI issues (explanations,...)
|
||||
- fix issue with password only field
|
||||
|
||||
## 0.7.2 - 2014-05-28
|
||||
- fix login issue
|
||||
- fix different dialogs
|
||||
- fix safari mobile bug
|
||||
- fix Safari mobile bug
|
||||
- fix webworker debugging
|
||||
- fix issue with prosody
|
||||
- fix issue with Prosody
|
||||
- fix submodule state
|
||||
- add debug flag
|
||||
- add icon for video calls
|
||||
@@ -292,7 +363,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- minor style fixes
|
||||
- move complete to new notification api
|
||||
|
||||
|
||||
## 0.7.1 - 2014-03-18
|
||||
- fix emoticons
|
||||
- fix unique message id
|
||||
@@ -304,27 +374,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- update & extend hover info
|
||||
- handle presence of type unsubscribed
|
||||
- remove roster footer if offline
|
||||
- enhance otr error handling
|
||||
- enhance OTR error handling
|
||||
- enhance translations
|
||||
- reduce initial timeout
|
||||
- fix notices
|
||||
- fix friendship response dialog
|
||||
- fix shared roster item removel
|
||||
- fix debug function
|
||||
- fix webrtc bug
|
||||
- fix WebRTC bug
|
||||
- fix storage check
|
||||
- fix firefox fullscreen
|
||||
- fix Firefox fullscreen
|
||||
|
||||
## 0.6.0 - 2014-02-28
|
||||
- add notice stack (for e.g. friendship requests)
|
||||
- add option to change presence
|
||||
- support all available presence states
|
||||
- display own avatar
|
||||
- fix issue with prosody
|
||||
- fix issue with Prosody
|
||||
- fix multi-tab support
|
||||
- fix chrome notifications
|
||||
- fix otr error handling
|
||||
- fix webrtc bug
|
||||
- fix Chrome notifications
|
||||
- fix OTR error handling
|
||||
- fix WebRTC bug
|
||||
|
||||
## 0.5.2 - 2014-01-28
|
||||
- update strophe.js to v1.1.3
|
||||
@@ -334,8 +404,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 0.5.1 - 2014-01-27
|
||||
- fix chat window after call
|
||||
- fix nullpointer and context in webrtc
|
||||
- fix NULL pointer and context in WebRTC
|
||||
- handle already attached submit events on login form
|
||||
- style changes
|
||||
- fix webrtc startup
|
||||
- don't block application on dsa key generation
|
||||
- fix WebRTC startup
|
||||
- don't block application on DSA key generation
|
||||
|
||||
+45
-14
@@ -3,11 +3,13 @@ module.exports = function(grunt) {
|
||||
|
||||
var dep = grunt.file.readJSON('dep.json');
|
||||
var dep_files = dep.map(function(el) {
|
||||
return '<%= target %>/' + el.file;
|
||||
return el.file;
|
||||
});
|
||||
dep_files.push('<%= target %>/lib/translation.js');
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
github: grunt.file.readJSON('.github.json'),
|
||||
app: grunt.file.readJSON('package.json'),
|
||||
meta: {
|
||||
banner: grunt.file.read('banner.js')
|
||||
@@ -26,15 +28,8 @@ module.exports = function(grunt) {
|
||||
main: {
|
||||
files: [{
|
||||
expand: true,
|
||||
src: ['lib/i18next/i18next.min.js', 'lib/jquery-i18next/jquery-i18next.min.js',
|
||||
'lib/magnific-popup/dist/*.js', 'lib/favico.js/favico.js',
|
||||
'lib/emojione/lib/js/*.js', 'lib/emojione/assets/svg/*.svg',
|
||||
'lib/strophe.js/strophe.js', 'lib/strophe.x/*.js',
|
||||
'lib/strophe.bookmarks/*.js', 'lib/strophe.chatstates/*.js',
|
||||
'lib/strophe.vcard/*.js', 'lib/strophe.jinglejs/*-bundle.js',
|
||||
'lib/otr/build/**', 'lib/otr/lib/dsa-webworker.js',
|
||||
'lib/otr/lib/sm-webworker.js', 'lib/otr/lib/const.js',
|
||||
'lib/otr/lib/helpers.js', 'lib/otr/lib/dsa.js',
|
||||
src: ['lib/emojione/assets/svg/*.svg',
|
||||
'lib/otr/build/**', 'lib/otr/lib/*.js',
|
||||
'lib/otr/vendor/*.js', 'lib/*.js', 'LICENSE',
|
||||
'img/**', 'sound/**'
|
||||
],
|
||||
@@ -147,11 +142,11 @@ module.exports = function(grunt) {
|
||||
process: function(src, filepath) {
|
||||
filepath = filepath.replace(/^[a-z]+\//i, '');
|
||||
|
||||
if (filepath === 'lib/otr/build/dep/crypto.js') {
|
||||
if (filepath.match(/crypto\.js$/)) {
|
||||
src += ';';
|
||||
}
|
||||
|
||||
var data = dep[dep_files.indexOf('<%= target %>/' + filepath)];
|
||||
var data = dep[dep_files.indexOf(filepath)];
|
||||
|
||||
if (data) {
|
||||
return '\n/*!\n * Source: ' + filepath + ', license: ' + data.license + ', url: ' + data.url + '\n */\n' + src;
|
||||
@@ -161,14 +156,23 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
src: dep_files,
|
||||
dest: '<%= target %>/lib/jsxc.dep.js'
|
||||
dest: '<%= target %>/lib/jsxc.dep.js',
|
||||
filter: function(filepath) {
|
||||
if (!grunt.file.exists(filepath)) {
|
||||
grunt.fail.warn('Could not find: ' + filepath);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
nonull: true,
|
||||
},
|
||||
jsxc: {
|
||||
options: {
|
||||
banner: '/*! This file is concatenated for the browser. */\n\n'
|
||||
},
|
||||
src: ['src/jsxc.intro.js', 'src/jsxc.lib.js', 'src/jsxc.lib.xmpp.js',
|
||||
'src/jsxc.lib.*.js', 'tmp/template.js', 'src/jsxc.outro.js'
|
||||
'src/jsxc.lib.gui.js', 'src/jsxc.lib.*.js',
|
||||
'tmp/template.js', 'src/jsxc.outro.js'
|
||||
],
|
||||
dest: '<%= target %>/jsxc.js'
|
||||
}
|
||||
@@ -345,6 +349,29 @@ module.exports = function(grunt) {
|
||||
options: {
|
||||
config: '.scss-lint.yml'
|
||||
}
|
||||
},
|
||||
github_releaser2: {
|
||||
options: {
|
||||
repository: 'jsxc/jsxc',
|
||||
authentication: {
|
||||
type: 'token',
|
||||
token: '<%= github.token %>'
|
||||
},
|
||||
release: {
|
||||
body: 'see https://github.com/jsxc/jsxc/blob/master/CHANGELOG.md'
|
||||
}
|
||||
},
|
||||
release: {
|
||||
src: ['archives/jsxc-archives/jsxc-<%= app.version %>.zip', 'archives/jsxc-archives/jsxc-<%= app.version %>.zip.sig']
|
||||
},
|
||||
prerelease: {
|
||||
options: {
|
||||
release: {
|
||||
prerelease: true
|
||||
}
|
||||
},
|
||||
src: ['archives/jsxc-archives/jsxc-<%= app.version %>.zip', 'archives/jsxc-archives/jsxc-<%= app.version %>.zip.sig']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -369,6 +396,7 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-prettysass');
|
||||
grunt.loadNpmTasks('grunt-html-convert');
|
||||
grunt.loadNpmTasks('grunt-scss-lint');
|
||||
grunt.loadNpmTasks('grunt-github-releaser2');
|
||||
|
||||
//Default task
|
||||
grunt.registerTask('default', ['build', 'watch']);
|
||||
@@ -393,6 +421,9 @@ module.exports = function(grunt) {
|
||||
grunt.task.run(['search:changelog', 'build:prerelease', 'jsdoc']);
|
||||
});
|
||||
|
||||
grunt.registerTask('publish:release', ['github_releaser2:release']);
|
||||
grunt.registerTask('publish:prerelease', ['github_releaser2:prerelease']);
|
||||
|
||||
// before commit
|
||||
grunt.registerTask('pre-commit', ['search:console', 'jsbeautifier:pre-commit', 'scsslint', 'jshint']);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# JavaScript XMPP Client
|
||||
|
||||
[](https://travis-ci.org/jsxc/jsxc)
|
||||
[](https://dependencyci.com/github/jsxc/jsxc)
|
||||
|
||||
Real-time chat app. This app requires an external XMPP server (openfire, ejabberd etc.).
|
||||
|
||||
|
||||
+8
-6
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jsxc",
|
||||
"version": "3.1.0-beta",
|
||||
"version": "3.2.1",
|
||||
"homepage": "https://www.jsxc.org",
|
||||
"authors": [
|
||||
"sualko <klaus@jsxc.org>"
|
||||
@@ -27,13 +27,15 @@
|
||||
"devDependencies": {
|
||||
"emojione": "~2.2.7",
|
||||
"favico.js": "^0.3.10",
|
||||
"strophe.bookmarks": "https://raw.githubusercontent.com/sualko/strophejs-plugins/bookmarks/bookmarks/strophe.bookmarks.js",
|
||||
"strophe.bookmarks": "strophe/strophejs-plugin-bookmarks#ff9e95a1a823b927f8c4c45453aaa534857a37b4",
|
||||
"strophe.js": "strophejs#a11ebefa3db1b6712d51d0d309b9f68f8e391d1b",
|
||||
"strophe.vcard": "https://raw.githubusercontent.com/strophe/strophejs-plugins/2f07137ad2cbeaed41650ee46373c2f44e0f263a/vcard/strophe.vcard.js",
|
||||
"strophe.x": "https://raw.githubusercontent.com/strophe/strophejs-plugins/master/dataforms/src/strophe.x.js",
|
||||
"strophe.chatstates": "https://raw.githubusercontent.com/strophe/strophejs-plugins/master/chatstates/strophe.chatstates.js",
|
||||
"strophe.vcard": "strophe/strophejs-plugin-vcard#de3a0c97a2c520ed900ee15b04a0c16d5c663891",
|
||||
"strophe.x": "strophe/strophejs-plugin-dataforms",
|
||||
"strophe.chatstates": "strophe/strophejs-plugin-chatstates#fb0b5f5b03d98ba05ac9dec853fe2190794128b6",
|
||||
"jquery-i18next": "^1.2.0",
|
||||
"i18next": "^5.0.0",
|
||||
"magnific-popup": "^1.1.0"
|
||||
"magnific-popup": "^1.1.0",
|
||||
"strophejs-plugin-mam": "strophe/strophejs-plugin-mam#d7b9a8a0b404e3dd9c83dd9cc4bf28aec2e5f329",
|
||||
"strophejs-plugin-rsm": "strophe/strophejs-plugin-rsm#fa16b3b"
|
||||
}
|
||||
}
|
||||
|
||||
+82
-234
@@ -1,201 +1,4 @@
|
||||
@charset "UTF-8";
|
||||
/* basic scrollbar styling */
|
||||
/* vertical scrollbar */
|
||||
.mCSB_container {
|
||||
width: auto;
|
||||
margin-right: 30px;
|
||||
overflow: hidden; }
|
||||
|
||||
.mCSB_container.mCS_no_scrollbar {
|
||||
margin-right: 0; }
|
||||
|
||||
.mCS_disabled .mCSB_container.mCS_no_scrollbar, .mCS_destroyed .mCSB_container.mCS_no_scrollbar {
|
||||
margin-right: 30px; }
|
||||
|
||||
.mCustomScrollBox .mCSB_scrollTools {
|
||||
width: 16px;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
right: 0; }
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerContainer {
|
||||
height: 100%;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp + .mCSB_draggerContainer {
|
||||
padding-bottom: 40px; }
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerRail {
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px; }
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 30px; }
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
text-align: center; }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp, .mCSB_scrollTools .mCSB_buttonDown {
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
cursor: pointer; }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonDown {
|
||||
bottom: 0;
|
||||
margin-top: -40px; }
|
||||
|
||||
/* horizontal scrollbar */
|
||||
.mCSB_horizontal .mCSB_container {
|
||||
height: auto;
|
||||
margin-right: 0;
|
||||
margin-bottom: 30px;
|
||||
overflow: hidden; }
|
||||
|
||||
.mCSB_horizontal .mCSB_container.mCS_no_scrollbar {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.mCS_disabled .mCSB_horizontal .mCSB_container.mCS_no_scrollbar, .mCS_destroyed .mCSB_horizontal .mCSB_container.mCS_no_scrollbar {
|
||||
margin-right: 0;
|
||||
margin-bottom: 30px; }
|
||||
|
||||
.mCSB_horizontal.mCustomScrollBox .mCSB_scrollTools {
|
||||
width: 100%;
|
||||
height: 16px;
|
||||
top: auto;
|
||||
right: auto;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden; }
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerContainer {
|
||||
height: 100%;
|
||||
width: auto;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden; }
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft + .mCSB_draggerContainer {
|
||||
padding-bottom: 0;
|
||||
padding-right: 20px; }
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerRail {
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
margin: 7px 0;
|
||||
border-radius: 10px; }
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_dragger {
|
||||
width: 30px;
|
||||
height: 100%; }
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
margin: 6px auto;
|
||||
border-radius: 10px; }
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft, .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
|
||||
width: 20px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
float: left; }
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
|
||||
right: 0;
|
||||
bottom: auto;
|
||||
margin-left: -40px;
|
||||
margin-top: -16px;
|
||||
float: right; }
|
||||
|
||||
/* default scrollbar colors and backgrounds */
|
||||
.mCustomScrollBox .mCSB_scrollTools {
|
||||
opacity: 0.75; }
|
||||
|
||||
.mCustomScrollBox:hover .mCSB_scrollTools {
|
||||
opacity: 1; }
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerRail {
|
||||
background: #000;
|
||||
/* rgba fallback */
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
filter: "alpha(opacity=40)";
|
||||
-ms-filter: "alpha(opacity=40)";
|
||||
/* old ie */ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
|
||||
background: #fff;
|
||||
/* rgba fallback */
|
||||
background: rgba(255, 255, 255, 0.75);
|
||||
filter: "alpha(opacity=75)";
|
||||
-ms-filter: "alpha(opacity=75)";
|
||||
/* old ie */ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
filter: "alpha(opacity=85)";
|
||||
-ms-filter: "alpha(opacity=85)";
|
||||
/* old ie */ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
filter: "alpha(opacity=90)";
|
||||
-ms-filter: "alpha(opacity=90)";
|
||||
/* old ie */ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp, .mCSB_scrollTools .mCSB_buttonDown, .mCSB_scrollTools .mCSB_buttonLeft, .mCSB_scrollTools .mCSB_buttonRight {
|
||||
background-image: url(mCSB_buttons.png);
|
||||
background-repeat: no-repeat;
|
||||
opacity: 0.4;
|
||||
filter: "alpha(opacity=40)";
|
||||
-ms-filter: "alpha(opacity=40)";
|
||||
/* old ie */ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp {
|
||||
background-position: 0 0;
|
||||
/*
|
||||
sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
|
||||
*/ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonDown {
|
||||
background-position: 0 -20px;
|
||||
/*
|
||||
sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
|
||||
*/ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonLeft {
|
||||
background-position: 0 -40px;
|
||||
/*
|
||||
sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
|
||||
*/ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonRight {
|
||||
background-position: 0 -56px;
|
||||
/*
|
||||
sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
|
||||
*/ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp:hover, .mCSB_scrollTools .mCSB_buttonDown:hover, .mCSB_scrollTools .mCSB_buttonLeft:hover, .mCSB_scrollTools .mCSB_buttonRight:hover {
|
||||
opacity: 0.75;
|
||||
filter: "alpha(opacity=75)";
|
||||
-ms-filter: "alpha(opacity=75)";
|
||||
/* old ie */ }
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp:active, .mCSB_scrollTools .mCSB_buttonDown:active, .mCSB_scrollTools .mCSB_buttonLeft:active, .mCSB_scrollTools .mCSB_buttonRight:active {
|
||||
opacity: 0.9;
|
||||
filter: "alpha(opacity=90)";
|
||||
-ms-filter: "alpha(opacity=90)";
|
||||
/* old ie */ }
|
||||
|
||||
/* Magnific Popup CSS */
|
||||
.mfp-bg {
|
||||
top: 0;
|
||||
@@ -2365,7 +2168,8 @@ fieldset[disabled]
|
||||
width: 100%; }
|
||||
|
||||
#jsxc_dialog .mfp-close, #jsxc_webrtc .mfp-close {
|
||||
font-size: 23px; }
|
||||
font-size: 23px;
|
||||
font-weight: normal; }
|
||||
|
||||
.mfp-bg {
|
||||
z-index: 9000; }
|
||||
@@ -2748,7 +2552,7 @@ fieldset[disabled]
|
||||
width: 14px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: -14px !important;
|
||||
right: 100%;
|
||||
top: 0;
|
||||
z-index: 110;
|
||||
background-color: transparent;
|
||||
@@ -2960,15 +2764,14 @@ fieldset[disabled]
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 30px;
|
||||
height: 30px; }
|
||||
width: 30px; }
|
||||
@media (max-width: 768px) {
|
||||
#jsxc_windowListSB {
|
||||
display: none; } }
|
||||
#jsxc_windowListSB > div {
|
||||
box-sizing: border-box;
|
||||
width: 14px;
|
||||
height: 100%;
|
||||
height: 30px;
|
||||
background-color: #cccccc;
|
||||
color: #807f7f;
|
||||
text-align: center;
|
||||
@@ -3078,7 +2881,8 @@ fieldset[disabled]
|
||||
.jsxc_window .jsxc_emoticons:hover:after {
|
||||
opacity: 0.5; }
|
||||
.jsxc_window .jsxc_fade {
|
||||
position: relative; }
|
||||
position: relative;
|
||||
overflow: hidden; }
|
||||
.jsxc_window .jsxc_fade .jsxc_overlay {
|
||||
display: none;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
@@ -3128,6 +2932,31 @@ fieldset[disabled]
|
||||
text-overflow: ellipsis; }
|
||||
.jsxc_window .jsxc_fade .jsxc_overlay > div a:hover {
|
||||
text-decoration: underline; }
|
||||
.jsxc_window .jsxc_fade .jsxc_mam-load-more {
|
||||
display: none;
|
||||
text-align: center;
|
||||
font-size: 0.8em;
|
||||
font-style: italic;
|
||||
position: absolute;
|
||||
top: -42px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 42px;
|
||||
cursor: pointer;
|
||||
z-index: 80;
|
||||
line-height: 42px;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.5s, top 0.5s;
|
||||
transition: opacity 0.5s, top 0.5s; }
|
||||
.jsxc_window .jsxc_fade .jsxc_mam-load-more.jsxc_show {
|
||||
top: 0;
|
||||
opacity: 0.7; }
|
||||
.jsxc_window .jsxc_fade .jsxc_mam-load-more.jsxc_show:hover {
|
||||
opacity: 1; }
|
||||
.jsxc_window .jsxc_fade.jsxc_mam-enable .jsxc_textarea {
|
||||
padding-top: 42px; }
|
||||
.jsxc_window .jsxc_fade.jsxc_mam-enable .jsxc_mam-load-more {
|
||||
display: block; }
|
||||
.jsxc_window .jsxc_avatar {
|
||||
margin-top: 1px; }
|
||||
.jsxc_window .jsxc_textarea {
|
||||
@@ -3215,16 +3044,16 @@ fieldset[disabled]
|
||||
position: relative;
|
||||
outline: none;
|
||||
clear: both; }
|
||||
.jsxc_chatmessage.jsxc_error {
|
||||
opacity: 0.7; }
|
||||
.jsxc_chatmessage.jsxc_error:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: yellow; }
|
||||
.jsxc_chatmessage.jsxc_error:before {
|
||||
content: attr(data-error-msg);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
text-align: center;
|
||||
padding: 10px 5px; }
|
||||
.jsxc_chatmessage a {
|
||||
color: #00f;
|
||||
text-decoration: underline;
|
||||
@@ -3373,26 +3202,6 @@ fieldset[disabled]
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
vertical-align: middle; }
|
||||
.jsxc_sys.jsxc_composing {
|
||||
text-align: center;
|
||||
font-size: 0.9em;
|
||||
font-style: italic;
|
||||
display: block;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
-webkit-transition: opacity 0.6s;
|
||||
transition: opacity 0.6s; }
|
||||
.jsxc_sys.jsxc_composing:before {
|
||||
content: " ";
|
||||
width: 1.5em;
|
||||
height: 1em;
|
||||
display: inline-block;
|
||||
background-size: 80%;
|
||||
background-repeat: no-repeat;
|
||||
margin: 0 3px 0 0;
|
||||
background-image: url('../img/composing.png'); }
|
||||
.jsxc_sys.jsxc_composing.jsxc_fadein {
|
||||
opacity: 1; }
|
||||
|
||||
div.jsxc_settings {
|
||||
position: relative; }
|
||||
@@ -3429,6 +3238,35 @@ div.jsxc_transfer {
|
||||
div.jsxc_transfer.jsxc_enc.jsxc_trust {
|
||||
background-image: url('../img/padlock_close_green.svg'); }
|
||||
|
||||
.jsxc_status-msg {
|
||||
font-size: 12px;
|
||||
display: none;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
height: 50%;
|
||||
line-height: 17.5px;
|
||||
opacity: 0.7; }
|
||||
.jsxc_status-msg.jsxc_composing:before {
|
||||
content: " ";
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
display: inline-block;
|
||||
background-size: cover;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url('../img/composing.png'); }
|
||||
|
||||
.jsxc_status-msg-show .jsxc_name {
|
||||
height: 50%;
|
||||
line-height: 20px; }
|
||||
|
||||
.jsxc_status-msg-show .jsxc_status-msg {
|
||||
display: block; }
|
||||
|
||||
.jsxc_status-msg-show .jsxc_lastmsg {
|
||||
display: none !important; }
|
||||
|
||||
.jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_bar .jsxc_avatar, li[data-type='groupchat'] .jsxc_avatar {
|
||||
text-indent: 999px;
|
||||
background-image: url('../img/group_white.svg');
|
||||
@@ -3438,7 +3276,7 @@ div.jsxc_transfer {
|
||||
.jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_fade {
|
||||
padding-top: 44px; }
|
||||
|
||||
.jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_fingerprints, .jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_verification, .jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_transfer, .jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_video, .jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_sendFile {
|
||||
.jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_fingerprints, .jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_verification, .jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_transfer, .jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_video {
|
||||
display: none; }
|
||||
|
||||
.jsxc_windowItem.jsxc_groupchat.jsxc_normal .jsxc_members {
|
||||
@@ -3506,6 +3344,8 @@ div.jsxc_transfer {
|
||||
color: inherit; }
|
||||
.jsxc_windowItem .jsxc_memberlist.jsxc_expand ul > li .jsxc_avatar {
|
||||
margin-right: 4px; }
|
||||
.jsxc_windowItem .jsxc_memberlist .jsxc_avatar :before {
|
||||
display: none; }
|
||||
|
||||
li[data-type='groupchat'] .jsxc_video {
|
||||
display: none; }
|
||||
@@ -3591,6 +3431,14 @@ li[data-type='groupchat'] .jsxc_video {
|
||||
background-color: #f2f2f2;
|
||||
padding: 10px;
|
||||
margin: 0 -30px 10px; }
|
||||
#jsxc_dialog form fieldset h3.jsxc_experimental:after {
|
||||
content: "experimental";
|
||||
font-size: 0.7em;
|
||||
border-radius: 2px;
|
||||
padding: 1px 5px;
|
||||
background-color: orange;
|
||||
margin-left: 5px;
|
||||
font-weight: normal; }
|
||||
#jsxc_dialog legend {
|
||||
border: 0;
|
||||
font-size: 20px; }
|
||||
|
||||
+1171
-560
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+9
-9
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -1,50 +0,0 @@
|
||||
;
|
||||
(function(root) {
|
||||
"use strict";
|
||||
|
||||
root.OTR = {}
|
||||
root.crypto = {}
|
||||
root.DSA = {};
|
||||
|
||||
// default imports
|
||||
var imports = [
|
||||
'build/dep/salsa20.js',
|
||||
'build/dep/bigint.js',
|
||||
'build/dep/crypto.js',
|
||||
'build/dep/eventemitter.js',
|
||||
'lib/const.js',
|
||||
'lib/helpers.js',
|
||||
'lib/dsa.js',
|
||||
]
|
||||
|
||||
function sendMsg(type, data) {
|
||||
postMessage({
|
||||
type: type,
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
self.onmessage = function(e) {
|
||||
var data = e.data;
|
||||
|
||||
root.crypto = {
|
||||
getRandomValues: function() {
|
||||
var buf = data.random;
|
||||
}
|
||||
};
|
||||
|
||||
if (data.imports)
|
||||
imports = data.imports
|
||||
|
||||
importScripts.apply(self, imports);
|
||||
|
||||
sendMsg('debug', 'DSA key creation started')
|
||||
|
||||
var dsa = new DSA()
|
||||
|
||||
sendMsg('debug', 'DSA key creation finished')
|
||||
|
||||
sendMsg('data', {key: dsa.packPrivate()})
|
||||
}
|
||||
|
||||
}(this))
|
||||
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
-10
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -1,857 +0,0 @@
|
||||
/**
|
||||
* @license MIT
|
||||
* @fileOverview Favico animations
|
||||
* @author Miroslav Magda, http://blog.ejci.net
|
||||
* @version 0.3.10
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create new favico instance
|
||||
* @param {Object} Options
|
||||
* @return {Object} Favico object
|
||||
* @example
|
||||
* var favico = new Favico({
|
||||
* bgColor : '#d00',
|
||||
* textColor : '#fff',
|
||||
* fontFamily : 'sans-serif',
|
||||
* fontStyle : 'bold',
|
||||
* position : 'down',
|
||||
* type : 'circle',
|
||||
* animation : 'slide',
|
||||
* dataUrl: function(url){},
|
||||
* win: top
|
||||
* });
|
||||
*/
|
||||
(function () {
|
||||
|
||||
var Favico = (function (opt) {
|
||||
'use strict';
|
||||
opt = (opt) ? opt : {};
|
||||
var _def = {
|
||||
bgColor: '#d00',
|
||||
textColor: '#fff',
|
||||
fontFamily: 'sans-serif', //Arial,Verdana,Times New Roman,serif,sans-serif,...
|
||||
fontStyle: 'bold', //normal,italic,oblique,bold,bolder,lighter,100,200,300,400,500,600,700,800,900
|
||||
type: 'circle',
|
||||
position: 'down', // down, up, left, leftup (upleft)
|
||||
animation: 'slide',
|
||||
elementId: false,
|
||||
dataUrl: false,
|
||||
win: window
|
||||
};
|
||||
var _opt, _orig, _h, _w, _canvas, _context, _img, _ready, _lastBadge, _running, _readyCb, _stop, _browser, _animTimeout, _drawTimeout, _doc;
|
||||
|
||||
_browser = {};
|
||||
_browser.ff = typeof InstallTrigger != 'undefined';
|
||||
_browser.chrome = !!window.chrome;
|
||||
_browser.opera = !!window.opera || navigator.userAgent.indexOf('Opera') >= 0;
|
||||
_browser.ie = /*@cc_on!@*/false;
|
||||
_browser.safari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
|
||||
_browser.supported = (_browser.chrome || _browser.ff || _browser.opera);
|
||||
|
||||
var _queue = [];
|
||||
_readyCb = function () {
|
||||
};
|
||||
_ready = _stop = false;
|
||||
/**
|
||||
* Initialize favico
|
||||
*/
|
||||
var init = function () {
|
||||
//merge initial options
|
||||
_opt = merge(_def, opt);
|
||||
_opt.bgColor = hexToRgb(_opt.bgColor);
|
||||
_opt.textColor = hexToRgb(_opt.textColor);
|
||||
_opt.position = _opt.position.toLowerCase();
|
||||
_opt.animation = (animation.types['' + _opt.animation]) ? _opt.animation : _def.animation;
|
||||
|
||||
_doc = _opt.win.document;
|
||||
|
||||
var isUp = _opt.position.indexOf('up') > -1;
|
||||
var isLeft = _opt.position.indexOf('left') > -1;
|
||||
|
||||
//transform animation
|
||||
if (isUp || isLeft) {
|
||||
for (var i = 0; i < animation.types['' + _opt.animation].length; i++) {
|
||||
var step = animation.types['' + _opt.animation][i];
|
||||
|
||||
if (isUp) {
|
||||
if (step.y < 0.6) {
|
||||
step.y = step.y - 0.4;
|
||||
} else {
|
||||
step.y = step.y - 2 * step.y + (1 - step.w);
|
||||
}
|
||||
}
|
||||
|
||||
if (isLeft) {
|
||||
if (step.x < 0.6) {
|
||||
step.x = step.x - 0.4;
|
||||
} else {
|
||||
step.x = step.x - 2 * step.x + (1 - step.h);
|
||||
}
|
||||
}
|
||||
|
||||
animation.types['' + _opt.animation][i] = step;
|
||||
}
|
||||
}
|
||||
_opt.type = (type['' + _opt.type]) ? _opt.type : _def.type;
|
||||
|
||||
_orig = link.getIcon();
|
||||
//create temp canvas
|
||||
_canvas = document.createElement('canvas');
|
||||
//create temp image
|
||||
_img = document.createElement('img');
|
||||
if (_orig.hasAttribute('href')) {
|
||||
_img.setAttribute('crossOrigin', 'anonymous');
|
||||
//get width/height
|
||||
_img.onload = function () {
|
||||
_h = (_img.height > 0) ? _img.height : 32;
|
||||
_w = (_img.width > 0) ? _img.width : 32;
|
||||
_canvas.height = _h;
|
||||
_canvas.width = _w;
|
||||
_context = _canvas.getContext('2d');
|
||||
icon.ready();
|
||||
};
|
||||
_img.setAttribute('src', _orig.getAttribute('href'));
|
||||
} else {
|
||||
_img.onload = function () {
|
||||
_h = 32;
|
||||
_w = 32;
|
||||
_img.height = _h;
|
||||
_img.width = _w;
|
||||
_canvas.height = _h;
|
||||
_canvas.width = _w;
|
||||
_context = _canvas.getContext('2d');
|
||||
icon.ready();
|
||||
};
|
||||
_img.setAttribute('src', '');
|
||||
}
|
||||
|
||||
};
|
||||
/**
|
||||
* Icon namespace
|
||||
*/
|
||||
var icon = {};
|
||||
/**
|
||||
* Icon is ready (reset icon) and start animation (if ther is any)
|
||||
*/
|
||||
icon.ready = function () {
|
||||
_ready = true;
|
||||
icon.reset();
|
||||
_readyCb();
|
||||
};
|
||||
/**
|
||||
* Reset icon to default state
|
||||
*/
|
||||
icon.reset = function () {
|
||||
//reset
|
||||
if (!_ready) {
|
||||
return;
|
||||
}
|
||||
_queue = [];
|
||||
_lastBadge = false;
|
||||
_running = false;
|
||||
_context.clearRect(0, 0, _w, _h);
|
||||
_context.drawImage(_img, 0, 0, _w, _h);
|
||||
//_stop=true;
|
||||
link.setIcon(_canvas);
|
||||
//webcam('stop');
|
||||
//video('stop');
|
||||
window.clearTimeout(_animTimeout);
|
||||
window.clearTimeout(_drawTimeout);
|
||||
};
|
||||
/**
|
||||
* Start animation
|
||||
*/
|
||||
icon.start = function () {
|
||||
if (!_ready || _running) {
|
||||
return;
|
||||
}
|
||||
var finished = function () {
|
||||
_lastBadge = _queue[0];
|
||||
_running = false;
|
||||
if (_queue.length > 0) {
|
||||
_queue.shift();
|
||||
icon.start();
|
||||
} else {
|
||||
|
||||
}
|
||||
};
|
||||
if (_queue.length > 0) {
|
||||
_running = true;
|
||||
var run = function () {
|
||||
// apply options for this animation
|
||||
['type', 'animation', 'bgColor', 'textColor', 'fontFamily', 'fontStyle'].forEach(function (a) {
|
||||
if (a in _queue[0].options) {
|
||||
_opt[a] = _queue[0].options[a];
|
||||
}
|
||||
});
|
||||
animation.run(_queue[0].options, function () {
|
||||
finished();
|
||||
}, false);
|
||||
};
|
||||
if (_lastBadge) {
|
||||
animation.run(_lastBadge.options, function () {
|
||||
run();
|
||||
}, true);
|
||||
} else {
|
||||
run();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Badge types
|
||||
*/
|
||||
var type = {};
|
||||
var options = function (opt) {
|
||||
opt.n = ((typeof opt.n) === 'number') ? Math.abs(opt.n | 0) : opt.n;
|
||||
opt.x = _w * opt.x;
|
||||
opt.y = _h * opt.y;
|
||||
opt.w = _w * opt.w;
|
||||
opt.h = _h * opt.h;
|
||||
opt.len = ("" + opt.n).length;
|
||||
return opt;
|
||||
};
|
||||
/**
|
||||
* Generate circle
|
||||
* @param {Object} opt Badge options
|
||||
*/
|
||||
type.circle = function (opt) {
|
||||
opt = options(opt);
|
||||
var more = false;
|
||||
if (opt.len === 2) {
|
||||
opt.x = opt.x - opt.w * 0.4;
|
||||
opt.w = opt.w * 1.4;
|
||||
more = true;
|
||||
} else if (opt.len >= 3) {
|
||||
opt.x = opt.x - opt.w * 0.65;
|
||||
opt.w = opt.w * 1.65;
|
||||
more = true;
|
||||
}
|
||||
_context.clearRect(0, 0, _w, _h);
|
||||
_context.drawImage(_img, 0, 0, _w, _h);
|
||||
_context.beginPath();
|
||||
_context.font = _opt.fontStyle + " " + Math.floor(opt.h * (opt.n > 99 ? 0.85 : 1)) + "px " + _opt.fontFamily;
|
||||
_context.textAlign = 'center';
|
||||
if (more) {
|
||||
_context.moveTo(opt.x + opt.w / 2, opt.y);
|
||||
_context.lineTo(opt.x + opt.w - opt.h / 2, opt.y);
|
||||
_context.quadraticCurveTo(opt.x + opt.w, opt.y, opt.x + opt.w, opt.y + opt.h / 2);
|
||||
_context.lineTo(opt.x + opt.w, opt.y + opt.h - opt.h / 2);
|
||||
_context.quadraticCurveTo(opt.x + opt.w, opt.y + opt.h, opt.x + opt.w - opt.h / 2, opt.y + opt.h);
|
||||
_context.lineTo(opt.x + opt.h / 2, opt.y + opt.h);
|
||||
_context.quadraticCurveTo(opt.x, opt.y + opt.h, opt.x, opt.y + opt.h - opt.h / 2);
|
||||
_context.lineTo(opt.x, opt.y + opt.h / 2);
|
||||
_context.quadraticCurveTo(opt.x, opt.y, opt.x + opt.h / 2, opt.y);
|
||||
} else {
|
||||
_context.arc(opt.x + opt.w / 2, opt.y + opt.h / 2, opt.h / 2, 0, 2 * Math.PI);
|
||||
}
|
||||
_context.fillStyle = 'rgba(' + _opt.bgColor.r + ',' + _opt.bgColor.g + ',' + _opt.bgColor.b + ',' + opt.o + ')';
|
||||
_context.fill();
|
||||
_context.closePath();
|
||||
_context.beginPath();
|
||||
_context.stroke();
|
||||
_context.fillStyle = 'rgba(' + _opt.textColor.r + ',' + _opt.textColor.g + ',' + _opt.textColor.b + ',' + opt.o + ')';
|
||||
//_context.fillText((more) ? '9+' : opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
|
||||
if ((typeof opt.n) === 'number' && opt.n > 999) {
|
||||
_context.fillText(((opt.n > 9999) ? 9 : Math.floor(opt.n / 1000)) + 'k+', Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.2));
|
||||
} else {
|
||||
_context.fillText(opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
|
||||
}
|
||||
_context.closePath();
|
||||
};
|
||||
/**
|
||||
* Generate rectangle
|
||||
* @param {Object} opt Badge options
|
||||
*/
|
||||
type.rectangle = function (opt) {
|
||||
opt = options(opt);
|
||||
var more = false;
|
||||
if (opt.len === 2) {
|
||||
opt.x = opt.x - opt.w * 0.4;
|
||||
opt.w = opt.w * 1.4;
|
||||
more = true;
|
||||
} else if (opt.len >= 3) {
|
||||
opt.x = opt.x - opt.w * 0.65;
|
||||
opt.w = opt.w * 1.65;
|
||||
more = true;
|
||||
}
|
||||
_context.clearRect(0, 0, _w, _h);
|
||||
_context.drawImage(_img, 0, 0, _w, _h);
|
||||
_context.beginPath();
|
||||
_context.font = _opt.fontStyle + " " + Math.floor(opt.h * (opt.n > 99 ? 0.9 : 1)) + "px " + _opt.fontFamily;
|
||||
_context.textAlign = 'center';
|
||||
_context.fillStyle = 'rgba(' + _opt.bgColor.r + ',' + _opt.bgColor.g + ',' + _opt.bgColor.b + ',' + opt.o + ')';
|
||||
_context.fillRect(opt.x, opt.y, opt.w, opt.h);
|
||||
_context.fillStyle = 'rgba(' + _opt.textColor.r + ',' + _opt.textColor.g + ',' + _opt.textColor.b + ',' + opt.o + ')';
|
||||
//_context.fillText((more) ? '9+' : opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
|
||||
if ((typeof opt.n) === 'number' && opt.n > 999) {
|
||||
_context.fillText(((opt.n > 9999) ? 9 : Math.floor(opt.n / 1000)) + 'k+', Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.2));
|
||||
} else {
|
||||
_context.fillText(opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
|
||||
}
|
||||
_context.closePath();
|
||||
};
|
||||
|
||||
/**
|
||||
* Set badge
|
||||
*/
|
||||
var badge = function (number, opts) {
|
||||
opts = ((typeof opts) === 'string' ? {
|
||||
animation: opts
|
||||
} : opts) || {};
|
||||
_readyCb = function () {
|
||||
try {
|
||||
if (typeof (number) === 'number' ? (number > 0) : (number !== '')) {
|
||||
var q = {
|
||||
type: 'badge',
|
||||
options: {
|
||||
n: number
|
||||
}
|
||||
};
|
||||
if ('animation' in opts && animation.types['' + opts.animation]) {
|
||||
q.options.animation = '' + opts.animation;
|
||||
}
|
||||
if ('type' in opts && type['' + opts.type]) {
|
||||
q.options.type = '' + opts.type;
|
||||
}
|
||||
['bgColor', 'textColor'].forEach(function (o) {
|
||||
if (o in opts) {
|
||||
q.options[o] = hexToRgb(opts[o]);
|
||||
}
|
||||
});
|
||||
['fontStyle', 'fontFamily'].forEach(function (o) {
|
||||
if (o in opts) {
|
||||
q.options[o] = opts[o];
|
||||
}
|
||||
});
|
||||
_queue.push(q);
|
||||
if (_queue.length > 100) {
|
||||
throw new Error('Too many badges requests in queue.');
|
||||
}
|
||||
icon.start();
|
||||
} else {
|
||||
icon.reset();
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error('Error setting badge. Message: ' + e.message);
|
||||
}
|
||||
};
|
||||
if (_ready) {
|
||||
_readyCb();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Set image as icon
|
||||
*/
|
||||
var image = function (imageElement) {
|
||||
_readyCb = function () {
|
||||
try {
|
||||
var w = imageElement.width;
|
||||
var h = imageElement.height;
|
||||
var newImg = document.createElement('img');
|
||||
var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h);
|
||||
newImg.setAttribute('crossOrigin', 'anonymous');
|
||||
newImg.onload=function(){
|
||||
_context.clearRect(0, 0, _w, _h);
|
||||
_context.drawImage(newImg, 0, 0, _w, _h);
|
||||
link.setIcon(_canvas);
|
||||
};
|
||||
newImg.setAttribute('src', imageElement.getAttribute('src'));
|
||||
newImg.height = (h / ratio);
|
||||
newImg.width = (w / ratio);
|
||||
} catch (e) {
|
||||
throw new Error('Error setting image. Message: ' + e.message);
|
||||
}
|
||||
};
|
||||
if (_ready) {
|
||||
_readyCb();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Set video as icon
|
||||
*/
|
||||
var video = function (videoElement) {
|
||||
_readyCb = function () {
|
||||
try {
|
||||
if (videoElement === 'stop') {
|
||||
_stop = true;
|
||||
icon.reset();
|
||||
_stop = false;
|
||||
return;
|
||||
}
|
||||
//var w = videoElement.width;
|
||||
//var h = videoElement.height;
|
||||
//var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h);
|
||||
videoElement.addEventListener('play', function () {
|
||||
drawVideo(this);
|
||||
}, false);
|
||||
|
||||
} catch (e) {
|
||||
throw new Error('Error setting video. Message: ' + e.message);
|
||||
}
|
||||
};
|
||||
if (_ready) {
|
||||
_readyCb();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Set video as icon
|
||||
*/
|
||||
var webcam = function (action) {
|
||||
//UR
|
||||
if (!window.URL || !window.URL.createObjectURL) {
|
||||
window.URL = window.URL || {};
|
||||
window.URL.createObjectURL = function (obj) {
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
if (_browser.supported) {
|
||||
var newVideo = false;
|
||||
navigator.getUserMedia = navigator.getUserMedia || navigator.oGetUserMedia || navigator.msGetUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia;
|
||||
_readyCb = function () {
|
||||
try {
|
||||
if (action === 'stop') {
|
||||
_stop = true;
|
||||
icon.reset();
|
||||
_stop = false;
|
||||
return;
|
||||
}
|
||||
newVideo = document.createElement('video');
|
||||
newVideo.width = _w;
|
||||
newVideo.height = _h;
|
||||
navigator.getUserMedia({
|
||||
video: true,
|
||||
audio: false
|
||||
}, function (stream) {
|
||||
newVideo.src = URL.createObjectURL(stream);
|
||||
newVideo.play();
|
||||
drawVideo(newVideo);
|
||||
}, function () {
|
||||
});
|
||||
} catch (e) {
|
||||
throw new Error('Error setting webcam. Message: ' + e.message);
|
||||
}
|
||||
};
|
||||
if (_ready) {
|
||||
_readyCb();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Draw video to context and repeat :)
|
||||
*/
|
||||
function drawVideo(video) {
|
||||
if (video.paused || video.ended || _stop) {
|
||||
return false;
|
||||
}
|
||||
//nasty hack for FF webcam (Thanks to Julian Ćwirko, kontakt@redsunmedia.pl)
|
||||
try {
|
||||
_context.clearRect(0, 0, _w, _h);
|
||||
_context.drawImage(video, 0, 0, _w, _h);
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
_drawTimeout = setTimeout(function () {
|
||||
drawVideo(video);
|
||||
}, animation.duration);
|
||||
link.setIcon(_canvas);
|
||||
}
|
||||
|
||||
var link = {};
|
||||
/**
|
||||
* Get icon from HEAD tag or create a new <link> element
|
||||
*/
|
||||
link.getIcon = function () {
|
||||
var elm = false;
|
||||
//get link element
|
||||
var getLink = function () {
|
||||
var link = _doc.getElementsByTagName('head')[0].getElementsByTagName('link');
|
||||
for (var l = link.length, i = (l - 1); i >= 0; i--) {
|
||||
if ((/(^|\s)icon(\s|$)/i).test(link[i].getAttribute('rel'))) {
|
||||
return link[i];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
if (_opt.element) {
|
||||
elm = _opt.element;
|
||||
} else if (_opt.elementId) {
|
||||
//if img element identified by elementId
|
||||
elm = _doc.getElementById(_opt.elementId);
|
||||
elm.setAttribute('href', elm.getAttribute('src'));
|
||||
} else {
|
||||
//if link element
|
||||
elm = getLink();
|
||||
if (elm === false) {
|
||||
elm = _doc.createElement('link');
|
||||
elm.setAttribute('rel', 'icon');
|
||||
_doc.getElementsByTagName('head')[0].appendChild(elm);
|
||||
}
|
||||
}
|
||||
elm.setAttribute('type', 'image/png');
|
||||
return elm;
|
||||
};
|
||||
link.setIcon = function (canvas) {
|
||||
var url = canvas.toDataURL('image/png');
|
||||
if (_opt.dataUrl) {
|
||||
//if using custom exporter
|
||||
_opt.dataUrl(url);
|
||||
}
|
||||
if (_opt.element) {
|
||||
_opt.element.setAttribute('href', url);
|
||||
_opt.element.setAttribute('src', url);
|
||||
} else if (_opt.elementId) {
|
||||
//if is attached to element (image)
|
||||
var elm = _doc.getElementById(_opt.elementId);
|
||||
elm.setAttribute('href', url);
|
||||
elm.setAttribute('src', url);
|
||||
} else {
|
||||
//if is attached to fav icon
|
||||
if (_browser.ff || _browser.opera) {
|
||||
//for FF we need to "recreate" element, atach to dom and remove old <link>
|
||||
//var originalType = _orig.getAttribute('rel');
|
||||
var old = _orig;
|
||||
_orig = _doc.createElement('link');
|
||||
//_orig.setAttribute('rel', originalType);
|
||||
if (_browser.opera) {
|
||||
_orig.setAttribute('rel', 'icon');
|
||||
}
|
||||
_orig.setAttribute('rel', 'icon');
|
||||
_orig.setAttribute('type', 'image/png');
|
||||
_doc.getElementsByTagName('head')[0].appendChild(_orig);
|
||||
_orig.setAttribute('href', url);
|
||||
if (old.parentNode) {
|
||||
old.parentNode.removeChild(old);
|
||||
}
|
||||
} else {
|
||||
_orig.setAttribute('href', url);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb#answer-5624139
|
||||
//HEX to RGB convertor
|
||||
function hexToRgb(hex) {
|
||||
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
||||
hex = hex.replace(shorthandRegex, function (m, r, g, b) {
|
||||
return r + r + g + g + b + b;
|
||||
});
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return result ? {
|
||||
r: parseInt(result[1], 16),
|
||||
g: parseInt(result[2], 16),
|
||||
b: parseInt(result[3], 16)
|
||||
} : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge options
|
||||
*/
|
||||
function merge(def, opt) {
|
||||
var mergedOpt = {};
|
||||
var attrname;
|
||||
for (attrname in def) {
|
||||
mergedOpt[attrname] = def[attrname];
|
||||
}
|
||||
for (attrname in opt) {
|
||||
mergedOpt[attrname] = opt[attrname];
|
||||
}
|
||||
return mergedOpt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cross-browser page visibility shim
|
||||
* http://stackoverflow.com/questions/12536562/detect-whether-a-window-is-visible
|
||||
*/
|
||||
function isPageHidden() {
|
||||
return _doc.hidden || _doc.msHidden || _doc.webkitHidden || _doc.mozHidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* @namespace animation
|
||||
*/
|
||||
var animation = {};
|
||||
/**
|
||||
* Animation "frame" duration
|
||||
*/
|
||||
animation.duration = 40;
|
||||
/**
|
||||
* Animation types (none,fade,pop,slide)
|
||||
*/
|
||||
animation.types = {};
|
||||
animation.types.fade = [{
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.0
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.2
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.3
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.4
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.5
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.6
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.7
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.8
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 0.9
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1.0
|
||||
}];
|
||||
animation.types.none = [{
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}];
|
||||
animation.types.pop = [{
|
||||
x: 1,
|
||||
y: 1,
|
||||
w: 0,
|
||||
h: 0,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.9,
|
||||
y: 0.9,
|
||||
w: 0.1,
|
||||
h: 0.1,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.8,
|
||||
y: 0.8,
|
||||
w: 0.2,
|
||||
h: 0.2,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.7,
|
||||
y: 0.7,
|
||||
w: 0.3,
|
||||
h: 0.3,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.6,
|
||||
y: 0.6,
|
||||
w: 0.4,
|
||||
h: 0.4,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.5,
|
||||
y: 0.5,
|
||||
w: 0.5,
|
||||
h: 0.5,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}];
|
||||
animation.types.popFade = [{
|
||||
x: 0.75,
|
||||
y: 0.75,
|
||||
w: 0,
|
||||
h: 0,
|
||||
o: 0
|
||||
}, {
|
||||
x: 0.65,
|
||||
y: 0.65,
|
||||
w: 0.1,
|
||||
h: 0.1,
|
||||
o: 0.2
|
||||
}, {
|
||||
x: 0.6,
|
||||
y: 0.6,
|
||||
w: 0.2,
|
||||
h: 0.2,
|
||||
o: 0.4
|
||||
}, {
|
||||
x: 0.55,
|
||||
y: 0.55,
|
||||
w: 0.3,
|
||||
h: 0.3,
|
||||
o: 0.6
|
||||
}, {
|
||||
x: 0.50,
|
||||
y: 0.50,
|
||||
w: 0.4,
|
||||
h: 0.4,
|
||||
o: 0.8
|
||||
}, {
|
||||
x: 0.45,
|
||||
y: 0.45,
|
||||
w: 0.5,
|
||||
h: 0.5,
|
||||
o: 0.9
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}];
|
||||
animation.types.slide = [{
|
||||
x: 0.4,
|
||||
y: 1,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.9,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.9,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.8,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.7,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.6,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.5,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}, {
|
||||
x: 0.4,
|
||||
y: 0.4,
|
||||
w: 0.6,
|
||||
h: 0.6,
|
||||
o: 1
|
||||
}];
|
||||
/**
|
||||
* Run animation
|
||||
* @param {Object} opt Animation options
|
||||
* @param {Object} cb Callabak after all steps are done
|
||||
* @param {Object} revert Reverse order? true|false
|
||||
* @param {Object} step Optional step number (frame bumber)
|
||||
*/
|
||||
animation.run = function (opt, cb, revert, step) {
|
||||
var animationType = animation.types[isPageHidden() ? 'none' : _opt.animation];
|
||||
if (revert === true) {
|
||||
step = (typeof step !== 'undefined') ? step : animationType.length - 1;
|
||||
} else {
|
||||
step = (typeof step !== 'undefined') ? step : 0;
|
||||
}
|
||||
cb = (cb) ? cb : function () {
|
||||
};
|
||||
if ((step < animationType.length) && (step >= 0)) {
|
||||
type[_opt.type](merge(opt, animationType[step]));
|
||||
_animTimeout = setTimeout(function () {
|
||||
if (revert) {
|
||||
step = step - 1;
|
||||
} else {
|
||||
step = step + 1;
|
||||
}
|
||||
animation.run(opt, cb, revert, step);
|
||||
}, animation.duration);
|
||||
|
||||
link.setIcon(_canvas);
|
||||
} else {
|
||||
cb();
|
||||
return;
|
||||
}
|
||||
};
|
||||
//auto init
|
||||
init();
|
||||
return {
|
||||
badge: badge,
|
||||
video: video,
|
||||
image: image,
|
||||
webcam: webcam,
|
||||
reset: icon.reset,
|
||||
browser: {
|
||||
supported: _browser.supported
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// AMD / RequireJS
|
||||
if (typeof define !== 'undefined' && define.amd) {
|
||||
define([], function () {
|
||||
return Favico;
|
||||
});
|
||||
}
|
||||
// CommonJS
|
||||
else if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = Favico;
|
||||
}
|
||||
// included directly via <script> tag
|
||||
else {
|
||||
this.Favico = Favico;
|
||||
}
|
||||
|
||||
})();
|
||||
externo
-2
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -1 +0,0 @@
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.jqueryI18next=e()}(this,function(){"use strict";function t(t,a){function i(n,a,i){function r(t,n){return f.parseDefaultValueFromContent?e({},t,{defaultValue:n}):t}if(0!==a.length){var o="text";if(0===a.indexOf("[")){var l=a.split("]");a=l[1],o=l[0].substr(1,l[0].length-1)}if(a.indexOf(";")===a.length-1&&(a=a.substr(0,a.length-2)),"html"===o)n.html(t.t(a,r(i,n.html())));else if("text"===o)n.text(t.t(a,r(i,n.text())));else if("prepend"===o)n.prepend(t.t(a,r(i,n.html())));else if("append"===o)n.append(t.t(a,r(i,n.html())));else if(0===o.indexOf("data-")){var s=o.substr("data-".length),d=t.t(a,r(i,n.data(s)));n.data(s,d),n.attr(o,d)}else n.attr(o,t.t(a,r(i,n.attr(o))))}}function r(t,n){var r=t.attr(f.selectorAttr);if(r||"undefined"==typeof r||r===!1||(r=t.text()||t.val()),r){var o=t,l=t.data(f.targetAttr);if(l&&(o=t.find(l)||t),n||f.useOptionsAttr!==!0||(n=t.data(f.optionsAttr)),n=n||{},r.indexOf(";")>=0){var s=r.split(";");a.each(s,function(t,e){""!==e&&i(o,e,n)})}else i(o,r,n);if(f.useOptionsAttr===!0){var d={};d=e({clone:d},n),delete d.lng,t.data(f.optionsAttr,d)}}}function o(t){return this.each(function(){r(a(this),t);var e=a(this).find("["+f.selectorAttr+"]");e.each(function(){r(a(this),t)})})}var f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f=e({},n,f),a[f.tName]=t.t.bind(t),a[f.i18nName]=t,a.fn[f.handleName]=o}var e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},n={tName:"t",i18nName:"i18n",handleName:"localize",selectorAttr:"data-i18n",targetAttr:"i18n-target",optionsAttr:"i18n-options",useOptionsAttr:!1,parseDefaultValueFromContent:!0},a={init:t};return a});
|
||||
externo
-4
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
-7
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+4002
-3580
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
+49
-46
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -0,0 +1,399 @@
|
||||
;(function () {
|
||||
"use strict";
|
||||
|
||||
var root = this
|
||||
|
||||
var CryptoJS, BigInt, CONST, HLP, DSA
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = AKE
|
||||
CryptoJS = require('../vendor/crypto.js')
|
||||
BigInt = require('../vendor/bigint.js')
|
||||
CONST = require('./const.js')
|
||||
HLP = require('./helpers.js')
|
||||
DSA = require('./dsa.js')
|
||||
} else {
|
||||
root.OTR.AKE = AKE
|
||||
CryptoJS = root.CryptoJS
|
||||
BigInt = root.BigInt
|
||||
CONST = root.OTR.CONST
|
||||
HLP = root.OTR.HLP
|
||||
DSA = root.DSA
|
||||
}
|
||||
|
||||
// diffie-hellman modulus
|
||||
// see group 5, RFC 3526
|
||||
var N = BigInt.str2bigInt(CONST.N, 16)
|
||||
var N_MINUS_2 = BigInt.sub(N, BigInt.str2bigInt('2', 10))
|
||||
|
||||
function hMac(gx, gy, pk, kid, m) {
|
||||
var pass = CryptoJS.enc.Latin1.parse(m)
|
||||
var hmac = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, pass)
|
||||
hmac.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(gx)))
|
||||
hmac.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(gy)))
|
||||
hmac.update(CryptoJS.enc.Latin1.parse(pk))
|
||||
hmac.update(CryptoJS.enc.Latin1.parse(kid))
|
||||
return (hmac.finalize()).toString(CryptoJS.enc.Latin1)
|
||||
}
|
||||
|
||||
// AKE constructor
|
||||
function AKE(otr) {
|
||||
if (!(this instanceof AKE)) return new AKE(otr)
|
||||
|
||||
// otr instance
|
||||
this.otr = otr
|
||||
|
||||
// our keys
|
||||
this.our_dh = otr.our_old_dh
|
||||
this.our_keyid = otr.our_keyid - 1
|
||||
|
||||
// their keys
|
||||
this.their_y = null
|
||||
this.their_keyid = null
|
||||
this.their_priv_pk = null
|
||||
|
||||
// state
|
||||
this.ssid = null
|
||||
this.transmittedRS = false
|
||||
this.r = null
|
||||
|
||||
// bind methods
|
||||
var self = this
|
||||
;['sendMsg'].forEach(function (meth) {
|
||||
self[meth] = self[meth].bind(self)
|
||||
})
|
||||
}
|
||||
|
||||
AKE.prototype = {
|
||||
|
||||
constructor: AKE,
|
||||
|
||||
createKeys: function(g) {
|
||||
var s = BigInt.powMod(g, this.our_dh.privateKey, N)
|
||||
var secbytes = HLP.packMPI(s)
|
||||
this.ssid = HLP.mask(HLP.h2('\x00', secbytes), 0, 64) // first 64-bits
|
||||
var tmp = HLP.h2('\x01', secbytes)
|
||||
this.c = HLP.mask(tmp, 0, 128) // first 128-bits
|
||||
this.c_prime = HLP.mask(tmp, 128, 128) // second 128-bits
|
||||
this.m1 = HLP.h2('\x02', secbytes)
|
||||
this.m2 = HLP.h2('\x03', secbytes)
|
||||
this.m1_prime = HLP.h2('\x04', secbytes)
|
||||
this.m2_prime = HLP.h2('\x05', secbytes)
|
||||
},
|
||||
|
||||
verifySignMac: function (mac, aesctr, m2, c, their_y, our_dh_pk, m1, ctr) {
|
||||
// verify mac
|
||||
var vmac = HLP.makeMac(aesctr, m2)
|
||||
if (!HLP.compare(mac, vmac))
|
||||
return ['MACs do not match.']
|
||||
|
||||
// decrypt x
|
||||
var x = HLP.decryptAes(aesctr.substring(4), c, ctr)
|
||||
x = HLP.splitype(['PUBKEY', 'INT', 'SIG'], x.toString(CryptoJS.enc.Latin1))
|
||||
|
||||
var m = hMac(their_y, our_dh_pk, x[0], x[1], m1)
|
||||
var pub = DSA.parsePublic(x[0])
|
||||
|
||||
var r = HLP.bits2bigInt(x[2].substring(0, 20))
|
||||
var s = HLP.bits2bigInt(x[2].substring(20))
|
||||
|
||||
// verify sign m
|
||||
if (!DSA.verify(pub, m, r, s)) return ['Cannot verify signature of m.']
|
||||
|
||||
return [null, HLP.readLen(x[1]), pub]
|
||||
},
|
||||
|
||||
makeM: function (their_y, m1, c, m2) {
|
||||
var pk = this.otr.priv.packPublic()
|
||||
var kid = HLP.packINT(this.our_keyid)
|
||||
var m = hMac(this.our_dh.publicKey, their_y, pk, kid, m1)
|
||||
m = this.otr.priv.sign(m)
|
||||
var msg = pk + kid
|
||||
msg += BigInt.bigInt2bits(m[0], 20) // pad to 20 bytes
|
||||
msg += BigInt.bigInt2bits(m[1], 20)
|
||||
msg = CryptoJS.enc.Latin1.parse(msg)
|
||||
var aesctr = HLP.packData(HLP.encryptAes(msg, c, HLP.packCtr(0)))
|
||||
var mac = HLP.makeMac(aesctr, m2)
|
||||
return aesctr + mac
|
||||
},
|
||||
|
||||
akeSuccess: function (version) {
|
||||
HLP.debug.call(this.otr, 'success')
|
||||
|
||||
if (BigInt.equals(this.their_y, this.our_dh.publicKey))
|
||||
return this.otr.error('equal keys - we have a problem.')
|
||||
|
||||
this.otr.our_old_dh = this.our_dh
|
||||
this.otr.their_priv_pk = this.their_priv_pk
|
||||
|
||||
if (!(
|
||||
(this.their_keyid === this.otr.their_keyid &&
|
||||
BigInt.equals(this.their_y, this.otr.their_y)) ||
|
||||
(this.their_keyid === (this.otr.their_keyid - 1) &&
|
||||
BigInt.equals(this.their_y, this.otr.their_old_y))
|
||||
)) {
|
||||
|
||||
this.otr.their_y = this.their_y
|
||||
this.otr.their_old_y = null
|
||||
this.otr.their_keyid = this.their_keyid
|
||||
|
||||
// rotate keys
|
||||
this.otr.sessKeys[0] = [ new this.otr.DHSession(
|
||||
this.otr.our_dh
|
||||
, this.otr.their_y
|
||||
), null ]
|
||||
this.otr.sessKeys[1] = [ new this.otr.DHSession(
|
||||
this.otr.our_old_dh
|
||||
, this.otr.their_y
|
||||
), null ]
|
||||
|
||||
}
|
||||
|
||||
// ake info
|
||||
this.otr.ssid = this.ssid
|
||||
this.otr.transmittedRS = this.transmittedRS
|
||||
this.otr_version = version
|
||||
|
||||
// go encrypted
|
||||
this.otr.authstate = CONST.AUTHSTATE_NONE
|
||||
this.otr.msgstate = CONST.MSGSTATE_ENCRYPTED
|
||||
|
||||
// null out values
|
||||
this.r = null
|
||||
this.myhashed = null
|
||||
this.dhcommit = null
|
||||
this.encrypted = null
|
||||
this.hashed = null
|
||||
|
||||
this.otr.trigger('status', [CONST.STATUS_AKE_SUCCESS])
|
||||
|
||||
// send stored msgs
|
||||
this.otr.sendStored()
|
||||
},
|
||||
|
||||
handleAKE: function (msg) {
|
||||
var send, vsm, type
|
||||
var version = msg.version
|
||||
|
||||
switch (msg.type) {
|
||||
|
||||
case '\x02':
|
||||
HLP.debug.call(this.otr, 'd-h key message')
|
||||
|
||||
msg = HLP.splitype(['DATA', 'DATA'], msg.msg)
|
||||
|
||||
if (this.otr.authstate === CONST.AUTHSTATE_AWAITING_DHKEY) {
|
||||
var ourHash = HLP.readMPI(this.myhashed)
|
||||
var theirHash = HLP.readMPI(msg[1])
|
||||
if (BigInt.greater(ourHash, theirHash)) {
|
||||
type = '\x02'
|
||||
send = this.dhcommit
|
||||
break // ignore
|
||||
} else {
|
||||
// forget
|
||||
this.our_dh = this.otr.dh()
|
||||
this.otr.authstate = CONST.AUTHSTATE_NONE
|
||||
this.r = null
|
||||
this.myhashed = null
|
||||
}
|
||||
} else if (
|
||||
this.otr.authstate === CONST.AUTHSTATE_AWAITING_SIG
|
||||
) this.our_dh = this.otr.dh()
|
||||
|
||||
this.otr.authstate = CONST.AUTHSTATE_AWAITING_REVEALSIG
|
||||
|
||||
this.encrypted = msg[0].substring(4)
|
||||
this.hashed = msg[1].substring(4)
|
||||
|
||||
type = '\x0a'
|
||||
send = HLP.packMPI(this.our_dh.publicKey)
|
||||
break
|
||||
|
||||
case '\x0a':
|
||||
HLP.debug.call(this.otr, 'reveal signature message')
|
||||
|
||||
msg = HLP.splitype(['MPI'], msg.msg)
|
||||
|
||||
if (this.otr.authstate !== CONST.AUTHSTATE_AWAITING_DHKEY) {
|
||||
if (this.otr.authstate === CONST.AUTHSTATE_AWAITING_SIG) {
|
||||
if (!BigInt.equals(this.their_y, HLP.readMPI(msg[0]))) return
|
||||
} else {
|
||||
return // ignore
|
||||
}
|
||||
}
|
||||
|
||||
this.otr.authstate = CONST.AUTHSTATE_AWAITING_SIG
|
||||
|
||||
this.their_y = HLP.readMPI(msg[0])
|
||||
|
||||
// verify gy is legal 2 <= gy <= N-2
|
||||
if (!HLP.checkGroup(this.their_y, N_MINUS_2))
|
||||
return this.otr.error('Illegal g^y.')
|
||||
|
||||
this.createKeys(this.their_y)
|
||||
|
||||
type = '\x11'
|
||||
send = HLP.packMPI(this.r)
|
||||
send += this.makeM(this.their_y, this.m1, this.c, this.m2)
|
||||
|
||||
this.m1 = null
|
||||
this.m2 = null
|
||||
this.c = null
|
||||
break
|
||||
|
||||
case '\x11':
|
||||
HLP.debug.call(this.otr, 'signature message')
|
||||
|
||||
if (this.otr.authstate !== CONST.AUTHSTATE_AWAITING_REVEALSIG)
|
||||
return // ignore
|
||||
|
||||
msg = HLP.splitype(['DATA', 'DATA', 'MAC'], msg.msg)
|
||||
|
||||
this.r = HLP.readMPI(msg[0])
|
||||
|
||||
// decrypt their_y
|
||||
var key = CryptoJS.enc.Hex.parse(BigInt.bigInt2str(this.r, 16))
|
||||
key = CryptoJS.enc.Latin1.stringify(key)
|
||||
|
||||
var gxmpi = HLP.decryptAes(this.encrypted, key, HLP.packCtr(0))
|
||||
gxmpi = gxmpi.toString(CryptoJS.enc.Latin1)
|
||||
|
||||
this.their_y = HLP.readMPI(gxmpi)
|
||||
|
||||
// verify hash
|
||||
var hash = CryptoJS.SHA256(CryptoJS.enc.Latin1.parse(gxmpi))
|
||||
|
||||
if (!HLP.compare(this.hashed, hash.toString(CryptoJS.enc.Latin1)))
|
||||
return this.otr.error('Hashed g^x does not match.')
|
||||
|
||||
// verify gx is legal 2 <= g^x <= N-2
|
||||
if (!HLP.checkGroup(this.their_y, N_MINUS_2))
|
||||
return this.otr.error('Illegal g^x.')
|
||||
|
||||
this.createKeys(this.their_y)
|
||||
|
||||
vsm = this.verifySignMac(
|
||||
msg[2]
|
||||
, msg[1]
|
||||
, this.m2
|
||||
, this.c
|
||||
, this.their_y
|
||||
, this.our_dh.publicKey
|
||||
, this.m1
|
||||
, HLP.packCtr(0)
|
||||
)
|
||||
if (vsm[0]) return this.otr.error(vsm[0])
|
||||
|
||||
// store their key
|
||||
this.their_keyid = vsm[1]
|
||||
this.their_priv_pk = vsm[2]
|
||||
|
||||
send = this.makeM(
|
||||
this.their_y
|
||||
, this.m1_prime
|
||||
, this.c_prime
|
||||
, this.m2_prime
|
||||
)
|
||||
|
||||
this.m1 = null
|
||||
this.m2 = null
|
||||
this.m1_prime = null
|
||||
this.m2_prime = null
|
||||
this.c = null
|
||||
this.c_prime = null
|
||||
|
||||
this.sendMsg(version, '\x12', send)
|
||||
this.akeSuccess(version)
|
||||
return
|
||||
|
||||
case '\x12':
|
||||
HLP.debug.call(this.otr, 'data message')
|
||||
|
||||
if (this.otr.authstate !== CONST.AUTHSTATE_AWAITING_SIG)
|
||||
return // ignore
|
||||
|
||||
msg = HLP.splitype(['DATA', 'MAC'], msg.msg)
|
||||
|
||||
vsm = this.verifySignMac(
|
||||
msg[1]
|
||||
, msg[0]
|
||||
, this.m2_prime
|
||||
, this.c_prime
|
||||
, this.their_y
|
||||
, this.our_dh.publicKey
|
||||
, this.m1_prime
|
||||
, HLP.packCtr(0)
|
||||
)
|
||||
if (vsm[0]) return this.otr.error(vsm[0])
|
||||
|
||||
// store their key
|
||||
this.their_keyid = vsm[1]
|
||||
this.their_priv_pk = vsm[2]
|
||||
|
||||
this.m1_prime = null
|
||||
this.m2_prime = null
|
||||
this.c_prime = null
|
||||
|
||||
this.transmittedRS = true
|
||||
this.akeSuccess(version)
|
||||
return
|
||||
|
||||
default:
|
||||
return // ignore
|
||||
|
||||
}
|
||||
|
||||
this.sendMsg(version, type, send)
|
||||
},
|
||||
|
||||
sendMsg: function (version, type, msg) {
|
||||
var send = version + type
|
||||
var v3 = (version === CONST.OTR_VERSION_3)
|
||||
|
||||
// instance tags for v3
|
||||
if (v3) {
|
||||
HLP.debug.call(this.otr, 'instance tags')
|
||||
send += this.otr.our_instance_tag
|
||||
send += this.otr.their_instance_tag
|
||||
}
|
||||
|
||||
send += msg
|
||||
|
||||
// fragment message if necessary
|
||||
send = HLP.wrapMsg(
|
||||
send
|
||||
, this.otr.fragment_size
|
||||
, v3
|
||||
, this.otr.our_instance_tag
|
||||
, this.otr.their_instance_tag
|
||||
)
|
||||
if (send[0]) return this.otr.error(send[0])
|
||||
|
||||
this.otr.io(send[1])
|
||||
},
|
||||
|
||||
initiateAKE: function (version) {
|
||||
HLP.debug.call(this.otr, 'd-h commit message')
|
||||
|
||||
this.otr.trigger('status', [CONST.STATUS_AKE_INIT])
|
||||
|
||||
this.otr.authstate = CONST.AUTHSTATE_AWAITING_DHKEY
|
||||
|
||||
var gxmpi = HLP.packMPI(this.our_dh.publicKey)
|
||||
gxmpi = CryptoJS.enc.Latin1.parse(gxmpi)
|
||||
|
||||
this.r = BigInt.randBigInt(128)
|
||||
var key = CryptoJS.enc.Hex.parse(BigInt.bigInt2str(this.r, 16))
|
||||
key = CryptoJS.enc.Latin1.stringify(key)
|
||||
|
||||
this.myhashed = CryptoJS.SHA256(gxmpi)
|
||||
this.myhashed = HLP.packData(this.myhashed.toString(CryptoJS.enc.Latin1))
|
||||
|
||||
this.dhcommit = HLP.packData(HLP.encryptAes(gxmpi, key, HLP.packCtr(0)))
|
||||
this.dhcommit += this.myhashed
|
||||
|
||||
this.sendMsg(version, '\x02', this.dhcommit)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}).call(this)
|
||||
@@ -0,0 +1,746 @@
|
||||
;(function () {
|
||||
"use strict";
|
||||
|
||||
var root = this
|
||||
|
||||
var CryptoJS, BigInt, EventEmitter, Worker, SMWPath
|
||||
, CONST, HLP, Parse, AKE, SM, DSA
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = OTR
|
||||
CryptoJS = require('../vendor/crypto.js')
|
||||
BigInt = require('../vendor/bigint.js')
|
||||
EventEmitter = require('../vendor/eventemitter.js')
|
||||
SMWPath = require('path').join(__dirname, '/sm-webworker.js')
|
||||
CONST = require('./const.js')
|
||||
HLP = require('./helpers.js')
|
||||
Parse = require('./parse.js')
|
||||
AKE = require('./ake.js')
|
||||
SM = require('./sm.js')
|
||||
DSA = require('./dsa.js')
|
||||
// expose CONST for consistency with docs
|
||||
OTR.CONST = CONST
|
||||
} else {
|
||||
// copy over and expose internals
|
||||
Object.keys(root.OTR).forEach(function (k) {
|
||||
OTR[k] = root.OTR[k]
|
||||
})
|
||||
root.OTR = OTR
|
||||
CryptoJS = root.CryptoJS
|
||||
BigInt = root.BigInt
|
||||
EventEmitter = root.EventEmitter
|
||||
Worker = root.Worker
|
||||
SMWPath = 'sm-webworker.js'
|
||||
CONST = OTR.CONST
|
||||
HLP = OTR.HLP
|
||||
Parse = OTR.Parse
|
||||
AKE = OTR.AKE
|
||||
SM = OTR.SM
|
||||
DSA = root.DSA
|
||||
}
|
||||
|
||||
// diffie-hellman modulus and generator
|
||||
// see group 5, RFC 3526
|
||||
var G = BigInt.str2bigInt(CONST.G, 10)
|
||||
var N = BigInt.str2bigInt(CONST.N, 16)
|
||||
|
||||
// JavaScript integers
|
||||
var MAX_INT = Math.pow(2, 53) - 1 // doubles
|
||||
var MAX_UINT = Math.pow(2, 31) - 1 // bitwise operators
|
||||
|
||||
// an internal callback
|
||||
function OTRCB(cb) {
|
||||
this.cb = cb
|
||||
}
|
||||
|
||||
// OTR contructor
|
||||
function OTR(options) {
|
||||
if (!(this instanceof OTR)) return new OTR(options)
|
||||
|
||||
// options
|
||||
options = options || {}
|
||||
|
||||
// private keys
|
||||
if (options.priv && !(options.priv instanceof DSA))
|
||||
throw new Error('Requires long-lived DSA key.')
|
||||
|
||||
this.priv = options.priv ? options.priv : new DSA()
|
||||
|
||||
this.fragment_size = options.fragment_size || 0
|
||||
if (this.fragment_size < 0)
|
||||
throw new Error('Fragment size must be a positive integer.')
|
||||
|
||||
this.send_interval = options.send_interval || 0
|
||||
if (this.send_interval < 0)
|
||||
throw new Error('Send interval must be a positive integer.')
|
||||
|
||||
this.outgoing = []
|
||||
|
||||
// instance tag
|
||||
this.our_instance_tag = options.instance_tag || OTR.makeInstanceTag()
|
||||
|
||||
// debug
|
||||
this.debug = !!options.debug
|
||||
|
||||
// smp in webworker options
|
||||
// this is still experimental and undocumented
|
||||
this.smw = options.smw
|
||||
|
||||
// init vals
|
||||
this.init()
|
||||
|
||||
// bind methods
|
||||
var self = this
|
||||
;['sendMsg', 'receiveMsg'].forEach(function (meth) {
|
||||
self[meth] = self[meth].bind(self)
|
||||
})
|
||||
|
||||
EventEmitter.call(this)
|
||||
}
|
||||
|
||||
// inherit from EE
|
||||
HLP.extend(OTR, EventEmitter)
|
||||
|
||||
// add to prototype
|
||||
OTR.prototype.init = function () {
|
||||
|
||||
this.msgstate = CONST.MSGSTATE_PLAINTEXT
|
||||
this.authstate = CONST.AUTHSTATE_NONE
|
||||
|
||||
this.ALLOW_V2 = true
|
||||
this.ALLOW_V3 = true
|
||||
|
||||
this.REQUIRE_ENCRYPTION = false
|
||||
this.SEND_WHITESPACE_TAG = false
|
||||
this.WHITESPACE_START_AKE = false
|
||||
this.ERROR_START_AKE = false
|
||||
|
||||
Parse.initFragment(this)
|
||||
|
||||
// their keys
|
||||
this.their_y = null
|
||||
this.their_old_y = null
|
||||
this.their_keyid = 0
|
||||
this.their_priv_pk = null
|
||||
this.their_instance_tag = '\x00\x00\x00\x00'
|
||||
|
||||
// our keys
|
||||
this.our_dh = this.dh()
|
||||
this.our_old_dh = this.dh()
|
||||
this.our_keyid = 2
|
||||
|
||||
// session keys
|
||||
this.sessKeys = [ new Array(2), new Array(2) ]
|
||||
|
||||
// saved
|
||||
this.storedMgs = []
|
||||
this.oldMacKeys = []
|
||||
|
||||
// smp
|
||||
this.sm = null // initialized after AKE
|
||||
|
||||
// when ake is complete
|
||||
// save their keys and the session
|
||||
this._akeInit()
|
||||
|
||||
// receive plaintext message since switching to plaintext
|
||||
// used to decide when to stop sending pt tags when SEND_WHITESPACE_TAG
|
||||
this.receivedPlaintext = false
|
||||
|
||||
}
|
||||
|
||||
OTR.prototype._akeInit = function () {
|
||||
this.ake = new AKE(this)
|
||||
this.transmittedRS = false
|
||||
this.ssid = null
|
||||
}
|
||||
|
||||
// smp over webworker
|
||||
OTR.prototype._SMW = function (otr, reqs) {
|
||||
this.otr = otr
|
||||
var opts = {
|
||||
path: SMWPath
|
||||
, seed: BigInt.getSeed
|
||||
}
|
||||
if (typeof otr.smw === 'object')
|
||||
Object.keys(otr.smw).forEach(function (k) {
|
||||
opts[k] = otr.smw[k]
|
||||
})
|
||||
|
||||
// load optional dep. in node
|
||||
if (typeof module !== 'undefined' && module.exports)
|
||||
Worker = require('webworker-threads').Worker
|
||||
|
||||
this.worker = new Worker(opts.path)
|
||||
var self = this
|
||||
this.worker.onmessage = function (e) {
|
||||
var d = e.data
|
||||
if (!d) return
|
||||
self.trigger(d.method, d.args)
|
||||
}
|
||||
this.worker.postMessage({
|
||||
type: 'seed'
|
||||
, seed: opts.seed()
|
||||
, imports: opts.imports
|
||||
})
|
||||
this.worker.postMessage({
|
||||
type: 'init'
|
||||
, reqs: reqs
|
||||
})
|
||||
}
|
||||
|
||||
// inherit from EE
|
||||
HLP.extend(OTR.prototype._SMW, EventEmitter)
|
||||
|
||||
// shim sm methods
|
||||
;['handleSM', 'rcvSecret', 'abort'].forEach(function (m) {
|
||||
OTR.prototype._SMW.prototype[m] = function () {
|
||||
this.worker.postMessage({
|
||||
type: 'method'
|
||||
, method: m
|
||||
, args: Array.prototype.slice.call(arguments, 0)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
OTR.prototype._smInit = function () {
|
||||
var reqs = {
|
||||
ssid: this.ssid
|
||||
, our_fp: this.priv.fingerprint()
|
||||
, their_fp: this.their_priv_pk.fingerprint()
|
||||
, debug: this.debug
|
||||
}
|
||||
if (this.smw) {
|
||||
if (this.sm) this.sm.worker.terminate() // destroy prev webworker
|
||||
this.sm = new this._SMW(this, reqs)
|
||||
} else {
|
||||
this.sm = new SM(reqs)
|
||||
}
|
||||
var self = this
|
||||
;['trust', 'abort', 'question'].forEach(function (e) {
|
||||
self.sm.on(e, function () {
|
||||
self.trigger('smp', [e].concat(Array.prototype.slice.call(arguments)))
|
||||
})
|
||||
})
|
||||
this.sm.on('send', function (ssid, send) {
|
||||
if (self.ssid === ssid) {
|
||||
send = self.prepareMsg(send)
|
||||
self.io(send)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
OTR.prototype.io = function (msg, meta) {
|
||||
|
||||
// buffer
|
||||
msg = ([].concat(msg)).map(function(m, i, arr) {
|
||||
var obj = { msg: m }
|
||||
if (!(meta instanceof OTRCB) ||
|
||||
i === (arr.length - 1) // only cb after last fragment is sent
|
||||
) obj.meta = meta
|
||||
return obj
|
||||
})
|
||||
this.outgoing = this.outgoing.concat(msg)
|
||||
|
||||
var self = this
|
||||
;(function send(first) {
|
||||
if (!first) {
|
||||
if (!self.outgoing.length) return
|
||||
var elem = self.outgoing.shift(), cb = null
|
||||
if (elem.meta instanceof OTRCB) {
|
||||
cb = elem.meta.cb
|
||||
elem.meta = null
|
||||
}
|
||||
self.trigger('io', [elem.msg, elem.meta])
|
||||
if (cb) cb()
|
||||
}
|
||||
setTimeout(send, first ? 0 : self.send_interval)
|
||||
}(true))
|
||||
|
||||
}
|
||||
|
||||
OTR.prototype.dh = function dh() {
|
||||
var keys = { privateKey: BigInt.randBigInt(320) }
|
||||
keys.publicKey = BigInt.powMod(G, keys.privateKey, N)
|
||||
return keys
|
||||
}
|
||||
|
||||
// session constructor
|
||||
OTR.prototype.DHSession = function DHSession(our_dh, their_y) {
|
||||
if (!(this instanceof DHSession)) return new DHSession(our_dh, their_y)
|
||||
|
||||
// shared secret
|
||||
var s = BigInt.powMod(their_y, our_dh.privateKey, N)
|
||||
var secbytes = HLP.packMPI(s)
|
||||
|
||||
// session id
|
||||
this.id = HLP.mask(HLP.h2('\x00', secbytes), 0, 64) // first 64-bits
|
||||
|
||||
// are we the high or low end of the connection?
|
||||
var sq = BigInt.greater(our_dh.publicKey, their_y)
|
||||
var sendbyte = sq ? '\x01' : '\x02'
|
||||
var rcvbyte = sq ? '\x02' : '\x01'
|
||||
|
||||
// sending and receiving keys
|
||||
this.sendenc = HLP.mask(HLP.h1(sendbyte, secbytes), 0, 128) // f16 bytes
|
||||
this.sendmac = CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.sendenc))
|
||||
this.sendmac = this.sendmac.toString(CryptoJS.enc.Latin1)
|
||||
|
||||
this.rcvenc = HLP.mask(HLP.h1(rcvbyte, secbytes), 0, 128)
|
||||
this.rcvmac = CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.rcvenc))
|
||||
this.rcvmac = this.rcvmac.toString(CryptoJS.enc.Latin1)
|
||||
this.rcvmacused = false
|
||||
|
||||
// extra symmetric key
|
||||
this.extra_symkey = HLP.h2('\xff', secbytes)
|
||||
|
||||
// counters
|
||||
this.send_counter = 0
|
||||
this.rcv_counter = 0
|
||||
}
|
||||
|
||||
OTR.prototype.rotateOurKeys = function () {
|
||||
|
||||
// reveal old mac keys
|
||||
var self = this
|
||||
this.sessKeys[1].forEach(function (sk) {
|
||||
if (sk && sk.rcvmacused) self.oldMacKeys.push(sk.rcvmac)
|
||||
})
|
||||
|
||||
// rotate our keys
|
||||
this.our_old_dh = this.our_dh
|
||||
this.our_dh = this.dh()
|
||||
this.our_keyid += 1
|
||||
|
||||
this.sessKeys[1][0] = this.sessKeys[0][0]
|
||||
this.sessKeys[1][1] = this.sessKeys[0][1]
|
||||
this.sessKeys[0] = [
|
||||
this.their_y ?
|
||||
new this.DHSession(this.our_dh, this.their_y) : null
|
||||
, this.their_old_y ?
|
||||
new this.DHSession(this.our_dh, this.their_old_y) : null
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
OTR.prototype.rotateTheirKeys = function (their_y) {
|
||||
|
||||
// increment their keyid
|
||||
this.their_keyid += 1
|
||||
|
||||
// reveal old mac keys
|
||||
var self = this
|
||||
this.sessKeys.forEach(function (sk) {
|
||||
if (sk[1] && sk[1].rcvmacused) self.oldMacKeys.push(sk[1].rcvmac)
|
||||
})
|
||||
|
||||
// rotate their keys / session
|
||||
this.their_old_y = this.their_y
|
||||
this.sessKeys[0][1] = this.sessKeys[0][0]
|
||||
this.sessKeys[1][1] = this.sessKeys[1][0]
|
||||
|
||||
// new keys / sessions
|
||||
this.their_y = their_y
|
||||
this.sessKeys[0][0] = new this.DHSession(this.our_dh, this.their_y)
|
||||
this.sessKeys[1][0] = new this.DHSession(this.our_old_dh, this.their_y)
|
||||
|
||||
}
|
||||
|
||||
OTR.prototype.prepareMsg = function (msg, esk) {
|
||||
if (this.msgstate !== CONST.MSGSTATE_ENCRYPTED || this.their_keyid === 0)
|
||||
return this.notify('Not ready to encrypt.')
|
||||
|
||||
var sessKeys = this.sessKeys[1][0]
|
||||
|
||||
if (sessKeys.send_counter >= MAX_INT)
|
||||
return this.notify('Should have rekeyed by now.')
|
||||
|
||||
sessKeys.send_counter += 1
|
||||
|
||||
var ctr = HLP.packCtr(sessKeys.send_counter)
|
||||
|
||||
var send = this.ake.otr_version + '\x03' // version and type
|
||||
var v3 = (this.ake.otr_version === CONST.OTR_VERSION_3)
|
||||
|
||||
if (v3) {
|
||||
send += this.our_instance_tag
|
||||
send += this.their_instance_tag
|
||||
}
|
||||
|
||||
send += '\x00' // flag
|
||||
send += HLP.packINT(this.our_keyid - 1)
|
||||
send += HLP.packINT(this.their_keyid)
|
||||
send += HLP.packMPI(this.our_dh.publicKey)
|
||||
send += ctr.substring(0, 8)
|
||||
|
||||
if (Math.ceil(msg.length / 8) >= MAX_UINT) // * 16 / 128
|
||||
return this.notify('Message is too long.')
|
||||
|
||||
var aes = HLP.encryptAes(
|
||||
CryptoJS.enc.Latin1.parse(msg)
|
||||
, sessKeys.sendenc
|
||||
, ctr
|
||||
)
|
||||
|
||||
send += HLP.packData(aes)
|
||||
send += HLP.make1Mac(send, sessKeys.sendmac)
|
||||
send += HLP.packData(this.oldMacKeys.splice(0).join(''))
|
||||
|
||||
send = HLP.wrapMsg(
|
||||
send
|
||||
, this.fragment_size
|
||||
, v3
|
||||
, this.our_instance_tag
|
||||
, this.their_instance_tag
|
||||
)
|
||||
if (send[0]) return this.notify(send[0])
|
||||
|
||||
// emit extra symmetric key
|
||||
if (esk) this.trigger('file', ['send', sessKeys.extra_symkey, esk])
|
||||
|
||||
return send[1]
|
||||
}
|
||||
|
||||
OTR.prototype.handleDataMsg = function (msg) {
|
||||
var vt = msg.version + msg.type
|
||||
|
||||
if (this.ake.otr_version === CONST.OTR_VERSION_3)
|
||||
vt += msg.instance_tags
|
||||
|
||||
var types = ['BYTE', 'INT', 'INT', 'MPI', 'CTR', 'DATA', 'MAC', 'DATA']
|
||||
msg = HLP.splitype(types, msg.msg)
|
||||
|
||||
// ignore flag
|
||||
var ign = (msg[0] === '\x01')
|
||||
|
||||
if (this.msgstate !== CONST.MSGSTATE_ENCRYPTED || msg.length !== 8) {
|
||||
if (!ign) this.error('Received an unreadable encrypted message.')
|
||||
return
|
||||
}
|
||||
|
||||
var our_keyid = this.our_keyid - HLP.readLen(msg[2])
|
||||
var their_keyid = this.their_keyid - HLP.readLen(msg[1])
|
||||
|
||||
if (our_keyid < 0 || our_keyid > 1) {
|
||||
if (!ign) this.error('Not of our latest keys.')
|
||||
return
|
||||
}
|
||||
|
||||
if (their_keyid < 0 || their_keyid > 1) {
|
||||
if (!ign) this.error('Not of your latest keys.')
|
||||
return
|
||||
}
|
||||
|
||||
var their_y = their_keyid ? this.their_old_y : this.their_y
|
||||
|
||||
if (their_keyid === 1 && !their_y) {
|
||||
if (!ign) this.error('Do not have that key.')
|
||||
return
|
||||
}
|
||||
|
||||
var sessKeys = this.sessKeys[our_keyid][their_keyid]
|
||||
|
||||
var ctr = HLP.unpackCtr(msg[4])
|
||||
if (ctr <= sessKeys.rcv_counter) {
|
||||
if (!ign) this.error('Counter in message is not larger.')
|
||||
return
|
||||
}
|
||||
sessKeys.rcv_counter = ctr
|
||||
|
||||
// verify mac
|
||||
vt += msg.slice(0, 6).join('')
|
||||
var vmac = HLP.make1Mac(vt, sessKeys.rcvmac)
|
||||
|
||||
if (!HLP.compare(msg[6], vmac)) {
|
||||
if (!ign) this.error('MACs do not match.')
|
||||
return
|
||||
}
|
||||
sessKeys.rcvmacused = true
|
||||
|
||||
var out = HLP.decryptAes(
|
||||
msg[5].substring(4)
|
||||
, sessKeys.rcvenc
|
||||
, HLP.padCtr(msg[4])
|
||||
)
|
||||
out = out.toString(CryptoJS.enc.Latin1)
|
||||
|
||||
if (!our_keyid) this.rotateOurKeys()
|
||||
if (!their_keyid) this.rotateTheirKeys(HLP.readMPI(msg[3]))
|
||||
|
||||
// parse TLVs
|
||||
var ind = out.indexOf('\x00')
|
||||
if (~ind) {
|
||||
this.handleTLVs(out.substring(ind + 1), sessKeys)
|
||||
out = out.substring(0, ind)
|
||||
}
|
||||
|
||||
out = CryptoJS.enc.Latin1.parse(out)
|
||||
return out.toString(CryptoJS.enc.Utf8)
|
||||
}
|
||||
|
||||
OTR.prototype.handleTLVs = function (tlvs, sessKeys) {
|
||||
var type, len, msg
|
||||
for (; tlvs.length; ) {
|
||||
type = HLP.unpackSHORT(tlvs.substr(0, 2))
|
||||
len = HLP.unpackSHORT(tlvs.substr(2, 2))
|
||||
|
||||
msg = tlvs.substr(4, len)
|
||||
|
||||
// TODO: handle pathological cases better
|
||||
if (msg.length < len) break
|
||||
|
||||
switch (type) {
|
||||
case 1:
|
||||
// Disconnected
|
||||
this.msgstate = CONST.MSGSTATE_FINISHED
|
||||
this.trigger('status', [CONST.STATUS_END_OTR])
|
||||
break
|
||||
case 2: case 3: case 4:
|
||||
case 5: case 6: case 7:
|
||||
// SMP
|
||||
if (this.msgstate !== CONST.MSGSTATE_ENCRYPTED) {
|
||||
if (this.sm) this.sm.abort()
|
||||
return
|
||||
}
|
||||
if (!this.sm) this._smInit()
|
||||
this.sm.handleSM({ msg: msg, type: type })
|
||||
break
|
||||
case 8:
|
||||
// utf8 filenames
|
||||
msg = msg.substring(4) // remove 4-byte indication
|
||||
msg = CryptoJS.enc.Latin1.parse(msg)
|
||||
msg = msg.toString(CryptoJS.enc.Utf8)
|
||||
|
||||
// Extra Symkey
|
||||
this.trigger('file', ['receive', sessKeys.extra_symkey, msg])
|
||||
break
|
||||
}
|
||||
|
||||
tlvs = tlvs.substring(4 + len)
|
||||
}
|
||||
}
|
||||
|
||||
OTR.prototype.smpSecret = function (secret, question) {
|
||||
if (this.msgstate !== CONST.MSGSTATE_ENCRYPTED)
|
||||
return this.notify('Must be encrypted for SMP.')
|
||||
|
||||
if (typeof secret !== 'string' || secret.length < 1)
|
||||
return this.notify('Secret is required.')
|
||||
|
||||
if (!this.sm) this._smInit()
|
||||
|
||||
// utf8 inputs
|
||||
secret = CryptoJS.enc.Utf8.parse(secret).toString(CryptoJS.enc.Latin1)
|
||||
if (question)
|
||||
question = CryptoJS.enc.Utf8.parse(question).toString(CryptoJS.enc.Latin1)
|
||||
|
||||
this.sm.rcvSecret(secret, question)
|
||||
}
|
||||
|
||||
OTR.prototype.sendQueryMsg = function () {
|
||||
var versions = {}
|
||||
, msg = CONST.OTR_TAG
|
||||
|
||||
if (this.ALLOW_V2) versions['2'] = true
|
||||
if (this.ALLOW_V3) versions['3'] = true
|
||||
|
||||
// but we don't allow v1
|
||||
// if (versions['1']) msg += '?'
|
||||
|
||||
var vs = Object.keys(versions)
|
||||
if (vs.length) {
|
||||
msg += 'v'
|
||||
vs.forEach(function (v) {
|
||||
if (v !== '1') msg += v
|
||||
})
|
||||
msg += '?'
|
||||
}
|
||||
|
||||
this.io(msg)
|
||||
this.trigger('status', [CONST.STATUS_SEND_QUERY])
|
||||
}
|
||||
|
||||
OTR.prototype.sendMsg = function (msg, meta) {
|
||||
if ( this.REQUIRE_ENCRYPTION ||
|
||||
this.msgstate !== CONST.MSGSTATE_PLAINTEXT
|
||||
) {
|
||||
msg = CryptoJS.enc.Utf8.parse(msg)
|
||||
msg = msg.toString(CryptoJS.enc.Latin1)
|
||||
}
|
||||
|
||||
switch (this.msgstate) {
|
||||
case CONST.MSGSTATE_PLAINTEXT:
|
||||
if (this.REQUIRE_ENCRYPTION) {
|
||||
this.storedMgs.push({msg: msg, meta: meta})
|
||||
this.sendQueryMsg()
|
||||
return
|
||||
}
|
||||
if (this.SEND_WHITESPACE_TAG && !this.receivedPlaintext) {
|
||||
msg += CONST.WHITESPACE_TAG // 16 byte tag
|
||||
if (this.ALLOW_V3) msg += CONST.WHITESPACE_TAG_V3
|
||||
if (this.ALLOW_V2) msg += CONST.WHITESPACE_TAG_V2
|
||||
}
|
||||
break
|
||||
case CONST.MSGSTATE_FINISHED:
|
||||
this.storedMgs.push({msg: msg, meta: meta})
|
||||
this.notify('Message cannot be sent at this time.', 'warn')
|
||||
return
|
||||
case CONST.MSGSTATE_ENCRYPTED:
|
||||
msg = this.prepareMsg(msg)
|
||||
break
|
||||
default:
|
||||
throw new Error('Unknown message state.')
|
||||
}
|
||||
|
||||
if (msg) this.io(msg, meta)
|
||||
}
|
||||
|
||||
OTR.prototype.receiveMsg = function (msg, meta) {
|
||||
|
||||
// parse type
|
||||
msg = Parse.parseMsg(this, msg)
|
||||
|
||||
if (!msg) return
|
||||
|
||||
switch (msg.cls) {
|
||||
case 'error':
|
||||
this.notify(msg.msg)
|
||||
return
|
||||
case 'ake':
|
||||
if ( msg.version === CONST.OTR_VERSION_3 &&
|
||||
this.checkInstanceTags(msg.instance_tags)
|
||||
) {
|
||||
this.notify(
|
||||
'Received a message intended for a different session.', 'warn')
|
||||
return // ignore
|
||||
}
|
||||
this.ake.handleAKE(msg)
|
||||
return
|
||||
case 'data':
|
||||
if ( msg.version === CONST.OTR_VERSION_3 &&
|
||||
this.checkInstanceTags(msg.instance_tags)
|
||||
) {
|
||||
this.notify(
|
||||
'Received a message intended for a different session.', 'warn')
|
||||
return // ignore
|
||||
}
|
||||
msg.msg = this.handleDataMsg(msg)
|
||||
msg.encrypted = true
|
||||
break
|
||||
case 'query':
|
||||
if (this.msgstate === CONST.MSGSTATE_ENCRYPTED) this._akeInit()
|
||||
this.doAKE(msg)
|
||||
break
|
||||
default:
|
||||
// check for encrypted
|
||||
if ( this.REQUIRE_ENCRYPTION ||
|
||||
this.msgstate !== CONST.MSGSTATE_PLAINTEXT
|
||||
) this.notify('Received an unencrypted message.', 'warn')
|
||||
|
||||
// received a plaintext message
|
||||
// stop sending the whitespace tag
|
||||
this.receivedPlaintext = true
|
||||
|
||||
// received a whitespace tag
|
||||
if (this.WHITESPACE_START_AKE && msg.ver.length > 0)
|
||||
this.doAKE(msg)
|
||||
}
|
||||
|
||||
if (msg.msg) this.trigger('ui', [msg.msg, !!msg.encrypted, meta])
|
||||
}
|
||||
|
||||
OTR.prototype.checkInstanceTags = function (it) {
|
||||
var their_it = HLP.readLen(it.substr(0, 4))
|
||||
var our_it = HLP.readLen(it.substr(4, 4))
|
||||
|
||||
if (our_it && our_it !== HLP.readLen(this.our_instance_tag))
|
||||
return true
|
||||
|
||||
if (HLP.readLen(this.their_instance_tag)) {
|
||||
if (HLP.readLen(this.their_instance_tag) !== their_it) return true
|
||||
} else {
|
||||
if (their_it < 100) return true
|
||||
this.their_instance_tag = HLP.packINT(their_it)
|
||||
}
|
||||
}
|
||||
|
||||
OTR.prototype.doAKE = function (msg) {
|
||||
if (this.ALLOW_V3 && ~msg.ver.indexOf(CONST.OTR_VERSION_3)) {
|
||||
this.ake.initiateAKE(CONST.OTR_VERSION_3)
|
||||
} else if (this.ALLOW_V2 && ~msg.ver.indexOf(CONST.OTR_VERSION_2)) {
|
||||
this.ake.initiateAKE(CONST.OTR_VERSION_2)
|
||||
} else {
|
||||
this.notify('OTR conversation requested, ' +
|
||||
'but no compatible protocol version found.', 'warn')
|
||||
}
|
||||
}
|
||||
|
||||
OTR.prototype.error = function (err) {
|
||||
if (!this.debug) err = 'An OTR error has occurred.'
|
||||
this.io('?OTR Error:' + err)
|
||||
this.notify(err)
|
||||
}
|
||||
|
||||
OTR.prototype.notify = function (err, severity) {
|
||||
this.trigger('error', [err, severity || 'error'])
|
||||
}
|
||||
|
||||
OTR.prototype.sendStored = function () {
|
||||
var self = this
|
||||
;(this.storedMgs.splice(0)).forEach(function (elem) {
|
||||
var msg = self.prepareMsg(elem.msg)
|
||||
self.io(msg, elem.meta)
|
||||
})
|
||||
}
|
||||
|
||||
OTR.prototype.sendFile = function (filename) {
|
||||
if (this.msgstate !== CONST.MSGSTATE_ENCRYPTED)
|
||||
return this.notify('Not ready to encrypt.')
|
||||
|
||||
if (this.ake.otr_version !== CONST.OTR_VERSION_3)
|
||||
return this.notify('Protocol v3 required.')
|
||||
|
||||
if (!filename) return this.notify('Please specify a filename.')
|
||||
|
||||
// utf8 filenames
|
||||
var l1name = CryptoJS.enc.Utf8.parse(filename)
|
||||
l1name = l1name.toString(CryptoJS.enc.Latin1)
|
||||
|
||||
if (l1name.length >= 65532) return this.notify('Filename is too long.')
|
||||
|
||||
var msg = '\x00' // null byte
|
||||
msg += '\x00\x08' // type 8 tlv
|
||||
msg += HLP.packSHORT(4 + l1name.length) // length of value
|
||||
msg += '\x00\x00\x00\x01' // four bytes indicating file
|
||||
msg += l1name
|
||||
|
||||
msg = this.prepareMsg(msg, filename)
|
||||
this.io(msg)
|
||||
}
|
||||
|
||||
OTR.prototype.endOtr = function (cb) {
|
||||
if (this.msgstate === CONST.MSGSTATE_ENCRYPTED) {
|
||||
if (typeof cb === 'function')
|
||||
cb = new OTRCB(cb)
|
||||
this.sendMsg('\x00\x00\x01\x00\x00', cb)
|
||||
if (this.sm) {
|
||||
if (this.smw) this.sm.worker.terminate() // destroy webworker
|
||||
this.sm = null
|
||||
}
|
||||
} else if (typeof cb === 'function')
|
||||
setTimeout(cb, 0)
|
||||
|
||||
this.msgstate = CONST.MSGSTATE_PLAINTEXT
|
||||
this.receivedPlaintext = false
|
||||
this.trigger('status', [CONST.STATUS_END_OTR])
|
||||
}
|
||||
|
||||
// attach methods
|
||||
|
||||
OTR.makeInstanceTag = function () {
|
||||
var num = BigInt.randBigInt(32)
|
||||
if (BigInt.greater(BigInt.str2bigInt('100', 16), num))
|
||||
return OTR.makeInstanceTag()
|
||||
return HLP.packINT(parseInt(BigInt.bigInt2str(num, 10), 10))
|
||||
}
|
||||
|
||||
}).call(this)
|
||||
@@ -0,0 +1,206 @@
|
||||
;(function () {
|
||||
"use strict";
|
||||
|
||||
var root = this
|
||||
|
||||
var Parse = {}, CryptoJS, CONST, HLP
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = Parse
|
||||
CryptoJS = require('../vendor/crypto.js')
|
||||
CONST = require('./const.js')
|
||||
HLP = require('./helpers.js')
|
||||
} else {
|
||||
root.OTR.Parse = Parse
|
||||
CryptoJS = root.CryptoJS
|
||||
CONST = root.OTR.CONST
|
||||
HLP = root.OTR.HLP
|
||||
}
|
||||
|
||||
// whitespace tags
|
||||
var tags = {}
|
||||
tags[CONST.WHITESPACE_TAG_V2] = CONST.OTR_VERSION_2
|
||||
tags[CONST.WHITESPACE_TAG_V3] = CONST.OTR_VERSION_3
|
||||
|
||||
Parse.parseMsg = function (otr, msg) {
|
||||
|
||||
var ver = []
|
||||
|
||||
// is this otr?
|
||||
var start = msg.indexOf(CONST.OTR_TAG)
|
||||
if (!~start) {
|
||||
|
||||
// restart fragments
|
||||
this.initFragment(otr)
|
||||
|
||||
// whitespace tags
|
||||
ind = msg.indexOf(CONST.WHITESPACE_TAG)
|
||||
|
||||
if (~ind) {
|
||||
|
||||
msg = msg.split('')
|
||||
msg.splice(ind, 16)
|
||||
|
||||
var tag, len = msg.length
|
||||
for (; ind < len;) {
|
||||
tag = msg.slice(ind, ind + 8).join('')
|
||||
if (Object.hasOwnProperty.call(tags, tag)) {
|
||||
msg.splice(ind, 8)
|
||||
ver.push(tags[tag])
|
||||
continue
|
||||
}
|
||||
ind += 8
|
||||
}
|
||||
|
||||
msg = msg.join('')
|
||||
|
||||
}
|
||||
|
||||
return { msg: msg, ver: ver }
|
||||
}
|
||||
|
||||
var ind = start + CONST.OTR_TAG.length
|
||||
var com = msg[ind]
|
||||
|
||||
// message fragment
|
||||
if (com === ',' || com === '|') {
|
||||
return this.msgFragment(otr, msg.substring(ind + 1), (com === '|'))
|
||||
}
|
||||
|
||||
this.initFragment(otr)
|
||||
|
||||
// query message
|
||||
if (~['?', 'v'].indexOf(com)) {
|
||||
|
||||
// version 1
|
||||
if (msg[ind] === '?') {
|
||||
ver.push(CONST.OTR_VERSION_1)
|
||||
ind += 1
|
||||
}
|
||||
|
||||
// other versions
|
||||
var vers = {
|
||||
'2': CONST.OTR_VERSION_2
|
||||
, '3': CONST.OTR_VERSION_3
|
||||
}
|
||||
var qs = msg.substring(ind + 1)
|
||||
var qi = qs.indexOf('?')
|
||||
|
||||
if (qi >= 1) {
|
||||
qs = qs.substring(0, qi).split('')
|
||||
if (msg[ind] === 'v') {
|
||||
qs.forEach(function (q) {
|
||||
if (Object.hasOwnProperty.call(vers, q)) ver.push(vers[q])
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return { cls: 'query', ver: ver }
|
||||
}
|
||||
|
||||
// otr message
|
||||
if (com === ':') {
|
||||
|
||||
ind += 1
|
||||
|
||||
var info = msg.substring(ind, ind + 4)
|
||||
if (info.length < 4) return { msg: msg }
|
||||
info = CryptoJS.enc.Base64.parse(info).toString(CryptoJS.enc.Latin1)
|
||||
|
||||
var version = info.substring(0, 2)
|
||||
var type = info.substring(2)
|
||||
|
||||
// supporting otr versions 2 and 3
|
||||
if (!otr['ALLOW_V' + HLP.unpackSHORT(version)]) return { msg: msg }
|
||||
|
||||
ind += 4
|
||||
|
||||
var end = msg.substring(ind).indexOf('.')
|
||||
if (!~end) return { msg: msg }
|
||||
|
||||
msg = CryptoJS.enc.Base64.parse(msg.substring(ind, ind + end))
|
||||
msg = CryptoJS.enc.Latin1.stringify(msg)
|
||||
|
||||
// instance tags
|
||||
var instance_tags
|
||||
if (version === CONST.OTR_VERSION_3) {
|
||||
instance_tags = msg.substring(0, 8)
|
||||
msg = msg.substring(8)
|
||||
}
|
||||
|
||||
var cls
|
||||
if (~['\x02', '\x0a', '\x11', '\x12'].indexOf(type)) {
|
||||
cls = 'ake'
|
||||
} else if (type === '\x03') {
|
||||
cls = 'data'
|
||||
}
|
||||
|
||||
return {
|
||||
version: version
|
||||
, type: type
|
||||
, msg: msg
|
||||
, cls: cls
|
||||
, instance_tags: instance_tags
|
||||
}
|
||||
}
|
||||
|
||||
// error message
|
||||
if (msg.substring(ind, ind + 7) === ' Error:') {
|
||||
if (otr.ERROR_START_AKE) {
|
||||
otr.sendQueryMsg()
|
||||
}
|
||||
return { msg: msg.substring(ind + 7), cls: 'error' }
|
||||
}
|
||||
|
||||
return { msg: msg }
|
||||
}
|
||||
|
||||
Parse.initFragment = function (otr) {
|
||||
otr.fragment = { s: '', j: 0, k: 0 }
|
||||
}
|
||||
|
||||
Parse.msgFragment = function (otr, msg, v3) {
|
||||
|
||||
msg = msg.split(',')
|
||||
|
||||
// instance tags
|
||||
if (v3) {
|
||||
var its = msg.shift().split('|')
|
||||
var their_it = HLP.packINT(parseInt(its[0], 16))
|
||||
var our_it = HLP.packINT(parseInt(its[1], 16))
|
||||
if (otr.checkInstanceTags(their_it + our_it)) return // ignore
|
||||
}
|
||||
|
||||
if (msg.length < 4 ||
|
||||
isNaN(parseInt(msg[0], 10)) ||
|
||||
isNaN(parseInt(msg[1], 10))
|
||||
) return
|
||||
|
||||
var k = parseInt(msg[0], 10)
|
||||
var n = parseInt(msg[1], 10)
|
||||
msg = msg[2]
|
||||
|
||||
if (n < k || n === 0 || k === 0) {
|
||||
this.initFragment(otr)
|
||||
return
|
||||
}
|
||||
|
||||
if (k === 1) {
|
||||
this.initFragment(otr)
|
||||
otr.fragment = { k: 1, n: n, s: msg }
|
||||
} else if (n === otr.fragment.n && k === (otr.fragment.k + 1)) {
|
||||
otr.fragment.s += msg
|
||||
otr.fragment.k += 1
|
||||
} else {
|
||||
this.initFragment(otr)
|
||||
}
|
||||
|
||||
if (n === k) {
|
||||
msg = otr.fragment.s
|
||||
this.initFragment(otr)
|
||||
return this.parseMsg(otr, msg)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
}).call(this)
|
||||
@@ -0,0 +1,436 @@
|
||||
;(function () {
|
||||
"use strict";
|
||||
|
||||
var root = this
|
||||
|
||||
var CryptoJS, BigInt, EventEmitter, CONST, HLP
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = SM
|
||||
CryptoJS = require('../vendor/crypto.js')
|
||||
BigInt = require('../vendor/bigint.js')
|
||||
EventEmitter = require('../vendor/eventemitter.js')
|
||||
CONST = require('./const.js')
|
||||
HLP = require('./helpers.js')
|
||||
} else {
|
||||
root.OTR.SM = SM
|
||||
CryptoJS = root.CryptoJS
|
||||
BigInt = root.BigInt
|
||||
EventEmitter = root.EventEmitter
|
||||
CONST = root.OTR.CONST
|
||||
HLP = root.OTR.HLP
|
||||
}
|
||||
|
||||
// diffie-hellman modulus and generator
|
||||
// see group 5, RFC 3526
|
||||
var G = BigInt.str2bigInt(CONST.G, 10)
|
||||
var N = BigInt.str2bigInt(CONST.N, 16)
|
||||
var N_MINUS_2 = BigInt.sub(N, BigInt.str2bigInt('2', 10))
|
||||
|
||||
// to calculate D's for zero-knowledge proofs
|
||||
var Q = BigInt.sub(N, BigInt.str2bigInt('1', 10))
|
||||
BigInt.divInt_(Q, 2) // meh
|
||||
|
||||
function SM(reqs) {
|
||||
if (!(this instanceof SM)) return new SM(reqs)
|
||||
|
||||
this.version = 1
|
||||
|
||||
this.our_fp = reqs.our_fp
|
||||
this.their_fp = reqs.their_fp
|
||||
this.ssid = reqs.ssid
|
||||
|
||||
this.debug = !!reqs.debug
|
||||
|
||||
// initial state
|
||||
this.init()
|
||||
}
|
||||
|
||||
// inherit from EE
|
||||
HLP.extend(SM, EventEmitter)
|
||||
|
||||
// set the initial values
|
||||
// also used when aborting
|
||||
SM.prototype.init = function () {
|
||||
this.smpstate = CONST.SMPSTATE_EXPECT1
|
||||
this.secret = null
|
||||
}
|
||||
|
||||
SM.prototype.makeSecret = function (our, secret) {
|
||||
var sha256 = CryptoJS.algo.SHA256.create()
|
||||
sha256.update(CryptoJS.enc.Latin1.parse(HLP.packBytes(this.version, 1)))
|
||||
sha256.update(CryptoJS.enc.Hex.parse(our ? this.our_fp : this.their_fp))
|
||||
sha256.update(CryptoJS.enc.Hex.parse(our ? this.their_fp : this.our_fp))
|
||||
sha256.update(CryptoJS.enc.Latin1.parse(this.ssid))
|
||||
sha256.update(CryptoJS.enc.Latin1.parse(secret))
|
||||
var hash = sha256.finalize()
|
||||
this.secret = HLP.bits2bigInt(hash.toString(CryptoJS.enc.Latin1))
|
||||
}
|
||||
|
||||
SM.prototype.makeG2s = function () {
|
||||
this.a2 = HLP.randomExponent()
|
||||
this.a3 = HLP.randomExponent()
|
||||
this.g2a = BigInt.powMod(G, this.a2, N)
|
||||
this.g3a = BigInt.powMod(G, this.a3, N)
|
||||
if ( !HLP.checkGroup(this.g2a, N_MINUS_2) ||
|
||||
!HLP.checkGroup(this.g3a, N_MINUS_2)
|
||||
) this.makeG2s()
|
||||
}
|
||||
|
||||
SM.prototype.computeGs = function (g2a, g3a) {
|
||||
this.g2 = BigInt.powMod(g2a, this.a2, N)
|
||||
this.g3 = BigInt.powMod(g3a, this.a3, N)
|
||||
}
|
||||
|
||||
SM.prototype.computePQ = function (r) {
|
||||
this.p = BigInt.powMod(this.g3, r, N)
|
||||
this.q = HLP.multPowMod(G, r, this.g2, this.secret, N)
|
||||
}
|
||||
|
||||
SM.prototype.computeR = function () {
|
||||
this.r = BigInt.powMod(this.QoQ, this.a3, N)
|
||||
}
|
||||
|
||||
SM.prototype.computeRab = function (r) {
|
||||
return BigInt.powMod(r, this.a3, N)
|
||||
}
|
||||
|
||||
SM.prototype.computeC = function (v, r) {
|
||||
return HLP.smpHash(v, BigInt.powMod(G, r, N))
|
||||
}
|
||||
|
||||
SM.prototype.computeD = function (r, a, c) {
|
||||
return BigInt.subMod(r, BigInt.multMod(a, c, Q), Q)
|
||||
}
|
||||
|
||||
// the bulk of the work
|
||||
SM.prototype.handleSM = function (msg) {
|
||||
var send, r2, r3, r7, t1, t2, t3, t4, rab, tmp2, cR, d7, ms, trust
|
||||
|
||||
var expectStates = {
|
||||
2: CONST.SMPSTATE_EXPECT1
|
||||
, 3: CONST.SMPSTATE_EXPECT2
|
||||
, 4: CONST.SMPSTATE_EXPECT3
|
||||
, 5: CONST.SMPSTATE_EXPECT4
|
||||
, 7: CONST.SMPSTATE_EXPECT1
|
||||
}
|
||||
|
||||
if (msg.type === 6) {
|
||||
this.init()
|
||||
this.trigger('abort')
|
||||
return
|
||||
}
|
||||
|
||||
// abort! there was an error
|
||||
if (this.smpstate !== expectStates[msg.type])
|
||||
return this.abort()
|
||||
|
||||
switch (this.smpstate) {
|
||||
|
||||
case CONST.SMPSTATE_EXPECT1:
|
||||
HLP.debug.call(this, 'smp tlv 2')
|
||||
|
||||
// user specified question
|
||||
var ind, question
|
||||
if (msg.type === 7) {
|
||||
ind = msg.msg.indexOf('\x00')
|
||||
question = msg.msg.substring(0, ind)
|
||||
msg.msg = msg.msg.substring(ind + 1)
|
||||
}
|
||||
|
||||
// 0:g2a, 1:c2, 2:d2, 3:g3a, 4:c3, 5:d3
|
||||
ms = HLP.readLen(msg.msg.substr(0, 4))
|
||||
if (ms !== 6) return this.abort()
|
||||
msg = HLP.unpackMPIs(6, msg.msg.substring(4))
|
||||
|
||||
if ( !HLP.checkGroup(msg[0], N_MINUS_2) ||
|
||||
!HLP.checkGroup(msg[3], N_MINUS_2)
|
||||
) return this.abort()
|
||||
|
||||
// verify znp's
|
||||
if (!HLP.ZKP(1, msg[1], HLP.multPowMod(G, msg[2], msg[0], msg[1], N)))
|
||||
return this.abort()
|
||||
|
||||
if (!HLP.ZKP(2, msg[4], HLP.multPowMod(G, msg[5], msg[3], msg[4], N)))
|
||||
return this.abort()
|
||||
|
||||
this.g3ao = msg[3] // save for later
|
||||
|
||||
this.makeG2s()
|
||||
|
||||
// zero-knowledge proof that the exponents
|
||||
// associated with g2a & g3a are known
|
||||
r2 = HLP.randomExponent()
|
||||
r3 = HLP.randomExponent()
|
||||
this.c2 = this.computeC(3, r2)
|
||||
this.c3 = this.computeC(4, r3)
|
||||
this.d2 = this.computeD(r2, this.a2, this.c2)
|
||||
this.d3 = this.computeD(r3, this.a3, this.c3)
|
||||
|
||||
this.computeGs(msg[0], msg[3])
|
||||
|
||||
this.smpstate = CONST.SMPSTATE_EXPECT0
|
||||
|
||||
if (question) {
|
||||
// assume utf8 question
|
||||
question = CryptoJS.enc.Latin1
|
||||
.parse(question)
|
||||
.toString(CryptoJS.enc.Utf8)
|
||||
}
|
||||
|
||||
// invoke question
|
||||
this.trigger('question', [question])
|
||||
return
|
||||
|
||||
case CONST.SMPSTATE_EXPECT2:
|
||||
HLP.debug.call(this, 'smp tlv 3')
|
||||
|
||||
// 0:g2a, 1:c2, 2:d2, 3:g3a, 4:c3, 5:d3, 6:p, 7:q, 8:cP, 9:d5, 10:d6
|
||||
ms = HLP.readLen(msg.msg.substr(0, 4))
|
||||
if (ms !== 11) return this.abort()
|
||||
msg = HLP.unpackMPIs(11, msg.msg.substring(4))
|
||||
|
||||
if ( !HLP.checkGroup(msg[0], N_MINUS_2) ||
|
||||
!HLP.checkGroup(msg[3], N_MINUS_2) ||
|
||||
!HLP.checkGroup(msg[6], N_MINUS_2) ||
|
||||
!HLP.checkGroup(msg[7], N_MINUS_2)
|
||||
) return this.abort()
|
||||
|
||||
// verify znp of c3 / c3
|
||||
if (!HLP.ZKP(3, msg[1], HLP.multPowMod(G, msg[2], msg[0], msg[1], N)))
|
||||
return this.abort()
|
||||
|
||||
if (!HLP.ZKP(4, msg[4], HLP.multPowMod(G, msg[5], msg[3], msg[4], N)))
|
||||
return this.abort()
|
||||
|
||||
this.g3ao = msg[3] // save for later
|
||||
|
||||
this.computeGs(msg[0], msg[3])
|
||||
|
||||
// verify znp of cP
|
||||
t1 = HLP.multPowMod(this.g3, msg[9], msg[6], msg[8], N)
|
||||
t2 = HLP.multPowMod(G, msg[9], this.g2, msg[10], N)
|
||||
t2 = BigInt.multMod(t2, BigInt.powMod(msg[7], msg[8], N), N)
|
||||
|
||||
if (!HLP.ZKP(5, msg[8], t1, t2))
|
||||
return this.abort()
|
||||
|
||||
var r4 = HLP.randomExponent()
|
||||
this.computePQ(r4)
|
||||
|
||||
// zero-knowledge proof that P & Q
|
||||
// were generated according to the protocol
|
||||
var r5 = HLP.randomExponent()
|
||||
var r6 = HLP.randomExponent()
|
||||
var tmp = HLP.multPowMod(G, r5, this.g2, r6, N)
|
||||
var cP = HLP.smpHash(6, BigInt.powMod(this.g3, r5, N), tmp)
|
||||
var d5 = this.computeD(r5, r4, cP)
|
||||
var d6 = this.computeD(r6, this.secret, cP)
|
||||
|
||||
// store these
|
||||
this.QoQ = BigInt.divMod(this.q, msg[7], N)
|
||||
this.PoP = BigInt.divMod(this.p, msg[6], N)
|
||||
|
||||
this.computeR()
|
||||
|
||||
// zero-knowledge proof that R
|
||||
// was generated according to the protocol
|
||||
r7 = HLP.randomExponent()
|
||||
tmp2 = BigInt.powMod(this.QoQ, r7, N)
|
||||
cR = HLP.smpHash(7, BigInt.powMod(G, r7, N), tmp2)
|
||||
d7 = this.computeD(r7, this.a3, cR)
|
||||
|
||||
this.smpstate = CONST.SMPSTATE_EXPECT4
|
||||
|
||||
send = HLP.packINT(8) + HLP.packMPIs([
|
||||
this.p
|
||||
, this.q
|
||||
, cP
|
||||
, d5
|
||||
, d6
|
||||
, this.r
|
||||
, cR
|
||||
, d7
|
||||
])
|
||||
|
||||
// TLV
|
||||
send = HLP.packTLV(4, send)
|
||||
break
|
||||
|
||||
case CONST.SMPSTATE_EXPECT3:
|
||||
HLP.debug.call(this, 'smp tlv 4')
|
||||
|
||||
// 0:p, 1:q, 2:cP, 3:d5, 4:d6, 5:r, 6:cR, 7:d7
|
||||
ms = HLP.readLen(msg.msg.substr(0, 4))
|
||||
if (ms !== 8) return this.abort()
|
||||
msg = HLP.unpackMPIs(8, msg.msg.substring(4))
|
||||
|
||||
if ( !HLP.checkGroup(msg[0], N_MINUS_2) ||
|
||||
!HLP.checkGroup(msg[1], N_MINUS_2) ||
|
||||
!HLP.checkGroup(msg[5], N_MINUS_2)
|
||||
) return this.abort()
|
||||
|
||||
// verify znp of cP
|
||||
t1 = HLP.multPowMod(this.g3, msg[3], msg[0], msg[2], N)
|
||||
t2 = HLP.multPowMod(G, msg[3], this.g2, msg[4], N)
|
||||
t2 = BigInt.multMod(t2, BigInt.powMod(msg[1], msg[2], N), N)
|
||||
|
||||
if (!HLP.ZKP(6, msg[2], t1, t2))
|
||||
return this.abort()
|
||||
|
||||
// verify znp of cR
|
||||
t3 = HLP.multPowMod(G, msg[7], this.g3ao, msg[6], N)
|
||||
this.QoQ = BigInt.divMod(msg[1], this.q, N) // save Q over Q
|
||||
t4 = HLP.multPowMod(this.QoQ, msg[7], msg[5], msg[6], N)
|
||||
|
||||
if (!HLP.ZKP(7, msg[6], t3, t4))
|
||||
return this.abort()
|
||||
|
||||
this.computeR()
|
||||
|
||||
// zero-knowledge proof that R
|
||||
// was generated according to the protocol
|
||||
r7 = HLP.randomExponent()
|
||||
tmp2 = BigInt.powMod(this.QoQ, r7, N)
|
||||
cR = HLP.smpHash(8, BigInt.powMod(G, r7, N), tmp2)
|
||||
d7 = this.computeD(r7, this.a3, cR)
|
||||
|
||||
send = HLP.packINT(3) + HLP.packMPIs([ this.r, cR, d7 ])
|
||||
send = HLP.packTLV(5, send)
|
||||
|
||||
rab = this.computeRab(msg[5])
|
||||
trust = !!BigInt.equals(rab, BigInt.divMod(msg[0], this.p, N))
|
||||
|
||||
this.trigger('trust', [trust, 'answered'])
|
||||
this.init()
|
||||
break
|
||||
|
||||
case CONST.SMPSTATE_EXPECT4:
|
||||
HLP.debug.call(this, 'smp tlv 5')
|
||||
|
||||
// 0:r, 1:cR, 2:d7
|
||||
ms = HLP.readLen(msg.msg.substr(0, 4))
|
||||
if (ms !== 3) return this.abort()
|
||||
msg = HLP.unpackMPIs(3, msg.msg.substring(4))
|
||||
|
||||
if (!HLP.checkGroup(msg[0], N_MINUS_2)) return this.abort()
|
||||
|
||||
// verify znp of cR
|
||||
t3 = HLP.multPowMod(G, msg[2], this.g3ao, msg[1], N)
|
||||
t4 = HLP.multPowMod(this.QoQ, msg[2], msg[0], msg[1], N)
|
||||
if (!HLP.ZKP(8, msg[1], t3, t4))
|
||||
return this.abort()
|
||||
|
||||
rab = this.computeRab(msg[0])
|
||||
trust = !!BigInt.equals(rab, this.PoP)
|
||||
|
||||
this.trigger('trust', [trust, 'asked'])
|
||||
this.init()
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
this.sendMsg(send)
|
||||
}
|
||||
|
||||
// send a message
|
||||
SM.prototype.sendMsg = function (send) {
|
||||
this.trigger('send', [this.ssid, '\x00' + send])
|
||||
}
|
||||
|
||||
SM.prototype.rcvSecret = function (secret, question) {
|
||||
HLP.debug.call(this, 'receive secret')
|
||||
|
||||
var fn, our = false
|
||||
if (this.smpstate === CONST.SMPSTATE_EXPECT0) {
|
||||
fn = this.answer
|
||||
} else {
|
||||
fn = this.initiate
|
||||
our = true
|
||||
}
|
||||
|
||||
this.makeSecret(our, secret)
|
||||
fn.call(this, question)
|
||||
}
|
||||
|
||||
SM.prototype.answer = function () {
|
||||
HLP.debug.call(this, 'smp answer')
|
||||
|
||||
var r4 = HLP.randomExponent()
|
||||
this.computePQ(r4)
|
||||
|
||||
// zero-knowledge proof that P & Q
|
||||
// were generated according to the protocol
|
||||
var r5 = HLP.randomExponent()
|
||||
var r6 = HLP.randomExponent()
|
||||
var tmp = HLP.multPowMod(G, r5, this.g2, r6, N)
|
||||
var cP = HLP.smpHash(5, BigInt.powMod(this.g3, r5, N), tmp)
|
||||
var d5 = this.computeD(r5, r4, cP)
|
||||
var d6 = this.computeD(r6, this.secret, cP)
|
||||
|
||||
this.smpstate = CONST.SMPSTATE_EXPECT3
|
||||
|
||||
var send = HLP.packINT(11) + HLP.packMPIs([
|
||||
this.g2a
|
||||
, this.c2
|
||||
, this.d2
|
||||
, this.g3a
|
||||
, this.c3
|
||||
, this.d3
|
||||
, this.p
|
||||
, this.q
|
||||
, cP
|
||||
, d5
|
||||
, d6
|
||||
])
|
||||
|
||||
this.sendMsg(HLP.packTLV(3, send))
|
||||
}
|
||||
|
||||
SM.prototype.initiate = function (question) {
|
||||
HLP.debug.call(this, 'smp initiate')
|
||||
|
||||
if (this.smpstate !== CONST.SMPSTATE_EXPECT1)
|
||||
this.abort() // abort + restart
|
||||
|
||||
this.makeG2s()
|
||||
|
||||
// zero-knowledge proof that the exponents
|
||||
// associated with g2a & g3a are known
|
||||
var r2 = HLP.randomExponent()
|
||||
var r3 = HLP.randomExponent()
|
||||
this.c2 = this.computeC(1, r2)
|
||||
this.c3 = this.computeC(2, r3)
|
||||
this.d2 = this.computeD(r2, this.a2, this.c2)
|
||||
this.d3 = this.computeD(r3, this.a3, this.c3)
|
||||
|
||||
// set the next expected state
|
||||
this.smpstate = CONST.SMPSTATE_EXPECT2
|
||||
|
||||
var send = ''
|
||||
var type = 2
|
||||
|
||||
if (question) {
|
||||
send += question
|
||||
send += '\x00'
|
||||
type = 7
|
||||
}
|
||||
|
||||
send += HLP.packINT(6) + HLP.packMPIs([
|
||||
this.g2a
|
||||
, this.c2
|
||||
, this.d2
|
||||
, this.g3a
|
||||
, this.c3
|
||||
, this.d3
|
||||
])
|
||||
|
||||
this.sendMsg(HLP.packTLV(type, send))
|
||||
}
|
||||
|
||||
SM.prototype.abort = function () {
|
||||
this.init()
|
||||
this.sendMsg(HLP.packTLV(6, ''))
|
||||
this.trigger('abort')
|
||||
}
|
||||
|
||||
}).call(this)
|
||||
@@ -1,116 +0,0 @@
|
||||
Strophe.addConnectionPlugin('bookmarks', {
|
||||
init : function(connection) {
|
||||
this.connection = connection;
|
||||
Strophe.addNamespace('PRIVATE', 'jabber:iq:private');
|
||||
Strophe.addNamespace('BOOKMARKS', 'storage:bookmarks');
|
||||
Strophe.addNamespace('PRIVACY', 'jabber:iq:privacy');
|
||||
Strophe.addNamespace('DELAY', 'jabber:x:delay');
|
||||
Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
|
||||
|
||||
},
|
||||
/**
|
||||
* Create private bookmark node.
|
||||
*
|
||||
* @param {function} [success] - Callback after success
|
||||
* @param {function} [error] - Callback after error
|
||||
*/
|
||||
createBookmarksNode : function(success, error) {
|
||||
// We do this instead of using publish-options because this is not
|
||||
// mandatory to implement according to XEP-0060
|
||||
this.connection.sendIQ($iq({
|
||||
type : 'set'
|
||||
}).c('pubsub', {
|
||||
xmlns : Strophe.NS.PUBSUB
|
||||
}).c('create', {
|
||||
node : 'storage:bookmarks'
|
||||
}).up().c('configure').c('x', {
|
||||
xmlns : 'jabber:x:data',
|
||||
type : 'submit'
|
||||
}).c('field', {
|
||||
'var' : 'FORM_TYPE',
|
||||
type : 'hidden'
|
||||
}).c('value').t('http://jabber.org/protocol/pubsub#node_config').up()
|
||||
.up().c('field', {
|
||||
'var' : 'pubsub#persist_items'
|
||||
}).c('value').t('1').up().up().c('field', {
|
||||
'var' : 'pubsub#access_model'
|
||||
}).c('value').t('whitelist'), success, error);
|
||||
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* Add bookmark to storage.
|
||||
*
|
||||
* @param {string} roomJid - The JabberID of the chat roomJid
|
||||
* @param {string} [alias] - A friendly name for the bookmark
|
||||
* @param {string} [nick] - The users's preferred roomnick for the chatroom
|
||||
* @param {boolean} [autojoin=false] - Whether the client should automatically join
|
||||
* the conference room on login.
|
||||
* @param {function} [success] - Callback after success
|
||||
* @param {function} [error] - Callback after error
|
||||
*/
|
||||
add : function(roomJid, alias, nick, autojoin, success, error) {
|
||||
var conferenceAttr = {
|
||||
jid: roomJid,
|
||||
autojoin: autojoin || false
|
||||
};
|
||||
|
||||
if (alias) {
|
||||
conferenceAttr.name = alias;
|
||||
}
|
||||
|
||||
var stanza = $iq({
|
||||
type : 'set'
|
||||
}).c('pubsub', {
|
||||
xmlns : Strophe.NS.PUBSUB
|
||||
}).c('publish', {
|
||||
node : Strophe.NS.BOOKMARKS
|
||||
}).c('item', {
|
||||
id : roomJid
|
||||
}).c('storage', {
|
||||
xmlns : Strophe.NS.BOOKMARKS
|
||||
}).c('conference', conferenceAttr);
|
||||
|
||||
if (nick) {
|
||||
stanza.c('nick').t(nick);
|
||||
}
|
||||
|
||||
this.connection.sendIQ(stanza, success, error);
|
||||
},
|
||||
/**
|
||||
* Retrieve all stored bookmarks.
|
||||
*
|
||||
* @param {function} [success] - Callback after success
|
||||
* @param {function} [error] - Callback after error
|
||||
*/
|
||||
get: function(success, error) {
|
||||
this.connection.sendIQ($iq({
|
||||
type : 'get'
|
||||
}).c('pubsub', {
|
||||
xmlns : Strophe.NS.PUBSUB
|
||||
}).c('items', {
|
||||
node : Strophe.NS.BOOKMARKS
|
||||
}), success, error);
|
||||
},
|
||||
/**
|
||||
* Delete the given entry for roomJid.
|
||||
*
|
||||
* @param {string} roomJid - The JabberID of the chat roomJid you want to remove
|
||||
* @param {function} [success] - Callback after success
|
||||
* @param {function} [error] - Callback after error
|
||||
* @param {boolean} [notify=false] - True: notify all subscribers
|
||||
*/
|
||||
delete: function(roomJid, success, error, notify) {
|
||||
this.connection.sendIQ($iq({
|
||||
type : 'set'
|
||||
}).c('pubsub', {
|
||||
xmlns : Strophe.NS.PUBSUB
|
||||
}).c('retract', {
|
||||
node : Strophe.NS.BOOKMARKS,
|
||||
notify: notify || false
|
||||
}).c('item', {
|
||||
id: roomJid
|
||||
}), success, error);
|
||||
}
|
||||
|
||||
});
|
||||
@@ -1,80 +0,0 @@
|
||||
/**
|
||||
* Chat state notifications (XEP 0085) plugin
|
||||
* @see http://xmpp.org/extensions/xep-0085.html
|
||||
*/
|
||||
Strophe.addConnectionPlugin('chatstates',
|
||||
{
|
||||
init: function (connection)
|
||||
{
|
||||
this._connection = connection;
|
||||
|
||||
Strophe.addNamespace('CHATSTATES', 'http://jabber.org/protocol/chatstates');
|
||||
},
|
||||
|
||||
statusChanged: function (status)
|
||||
{
|
||||
if (status === Strophe.Status.CONNECTED
|
||||
|| status === Strophe.Status.ATTACHED)
|
||||
{
|
||||
this._connection.addHandler(this._notificationReceived.bind(this),
|
||||
Strophe.NS.CHATSTATES, "message");
|
||||
}
|
||||
},
|
||||
|
||||
addActive: function(message)
|
||||
{
|
||||
return message.c('active', {xmlns: Strophe.NS.CHATSTATES}).up();
|
||||
},
|
||||
|
||||
_notificationReceived: function(message)
|
||||
{
|
||||
var composing = $(message).find('composing'),
|
||||
paused = $(message).find('paused'),
|
||||
active = $(message).find('active'),
|
||||
jid = $(message).attr('from');
|
||||
|
||||
if (composing.length > 0)
|
||||
{
|
||||
$(document).trigger('composing.chatstates', jid);
|
||||
}
|
||||
|
||||
if (paused.length > 0)
|
||||
{
|
||||
$(document).trigger('paused.chatstates', jid);
|
||||
}
|
||||
|
||||
if (active.length > 0)
|
||||
{
|
||||
$(document).trigger('active.chatstates', jid);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
sendActive: function(jid, type)
|
||||
{
|
||||
this._sendNotification(jid, type, 'active');
|
||||
},
|
||||
|
||||
sendComposing: function(jid, type)
|
||||
{
|
||||
this._sendNotification(jid, type, 'composing');
|
||||
},
|
||||
|
||||
sendPaused: function(jid, type)
|
||||
{
|
||||
this._sendNotification(jid, type, 'paused');
|
||||
},
|
||||
|
||||
_sendNotification: function(jid, type, notification)
|
||||
{
|
||||
if (!type) type = 'chat';
|
||||
|
||||
this._connection.send($msg(
|
||||
{
|
||||
to: jid,
|
||||
type: type
|
||||
})
|
||||
.c(notification, {xmlns: Strophe.NS.CHATSTATES}));
|
||||
}
|
||||
});
|
||||
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,76 +0,0 @@
|
||||
// Generated by CoffeeScript 1.10.0
|
||||
|
||||
/*
|
||||
Plugin to implement the vCard extension.
|
||||
http://xmpp.org/extensions/xep-0054.html
|
||||
|
||||
Author: Nathan Zorn (nathan.zorn@gmail.com)
|
||||
CoffeeScript port: Andreas Guth (guth@dbis.rwth-aachen.de)
|
||||
*/
|
||||
|
||||
|
||||
/* jslint configuration: */
|
||||
|
||||
|
||||
/* global document, window, setTimeout, clearTimeout, console,
|
||||
XMLHttpRequest, ActiveXObject,
|
||||
Base64, MD5,
|
||||
Strophe, $build, $msg, $iq, $pres
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var buildIq;
|
||||
|
||||
buildIq = function(type, jid, vCardEl) {
|
||||
var iq;
|
||||
iq = $iq(jid ? {
|
||||
type: type,
|
||||
to: jid
|
||||
} : {
|
||||
type: type
|
||||
});
|
||||
iq.c("vCard", {
|
||||
xmlns: Strophe.NS.VCARD
|
||||
});
|
||||
if (vCardEl) {
|
||||
iq.cnode(vCardEl);
|
||||
}
|
||||
return iq;
|
||||
};
|
||||
|
||||
Strophe.addConnectionPlugin('vcard', {
|
||||
_connection: null,
|
||||
init: function(conn) {
|
||||
this._connection = conn;
|
||||
return Strophe.addNamespace('VCARD', 'vcard-temp');
|
||||
},
|
||||
|
||||
/*Function
|
||||
Retrieve a vCard for a JID/Entity
|
||||
Parameters:
|
||||
(Function) handler_cb - The callback function used to handle the request.
|
||||
(String) jid - optional - The name of the entity to request the vCard
|
||||
If no jid is given, this function retrieves the current user's vcard.
|
||||
(Function) error_cb - The callback function used to handle error repsonse.
|
||||
*/
|
||||
get: function(handler_cb, jid, error_cb) {
|
||||
var iq;
|
||||
if (typeof jid === 'function') {
|
||||
error_cb = jid;
|
||||
jid = null;
|
||||
}
|
||||
iq = buildIq("get", jid);
|
||||
return this._connection.sendIQ(iq, handler_cb, error_cb);
|
||||
},
|
||||
|
||||
/* Function
|
||||
Set an entity's vCard.
|
||||
*/
|
||||
set: function(handler_cb, vCardEl, jid, error_cb) {
|
||||
var iq;
|
||||
iq = buildIq("set", jid, vCardEl);
|
||||
return this._connection.sendIQ(iq, handler_cb, error_cb);
|
||||
}
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
@@ -1,845 +0,0 @@
|
||||
// Generated by CoffeeScript 1.8.0
|
||||
(function() {
|
||||
var $field, $form, $item, $opt, Field, Form, Item, Option, helper,
|
||||
__slice = [].slice,
|
||||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
helper = {
|
||||
fill: function(src, target, klass) {
|
||||
var f, _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = src.length; _i < _len; _i++) {
|
||||
f = src[_i];
|
||||
_results.push(target.push(f instanceof klass ? f : new klass(f)));
|
||||
}
|
||||
return _results;
|
||||
},
|
||||
createHtmlFieldCouple: function(f) {
|
||||
var div, id;
|
||||
div = $("<div>");
|
||||
id = "Strophe.x.Field-" + f.type + "-" + f["var"];
|
||||
div.append("<label for='" + id + "'>" + (f.label || '') + "</label>").append($(f.toHTML()).attr("id", id)).append("<br />");
|
||||
return div.children();
|
||||
},
|
||||
getHtmlFields: function(html) {
|
||||
html = $(html);
|
||||
return __slice.call(html.find("input")).concat(__slice.call(html.find("select")), __slice.call(html.find("textarea")));
|
||||
}
|
||||
};
|
||||
|
||||
Form = (function() {
|
||||
Form._types = ["form", "submit", "cancel", "result"];
|
||||
|
||||
function Form(opt) {
|
||||
this.toHTML = __bind(this.toHTML, this);
|
||||
this.toJSON = __bind(this.toJSON, this);
|
||||
this.toXML = __bind(this.toXML, this);
|
||||
var f, i, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3;
|
||||
this.fields = [];
|
||||
this.items = [];
|
||||
this.reported = [];
|
||||
if (opt) {
|
||||
if (_ref = opt.type, __indexOf.call(Form._types, _ref) >= 0) {
|
||||
this.type = opt.type;
|
||||
}
|
||||
this.title = opt.title;
|
||||
this.instructions = opt.instructions;
|
||||
helper.fill = function(src, target, klass) {
|
||||
var f, _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = src.length; _i < _len; _i++) {
|
||||
f = src[_i];
|
||||
_results.push(target.push(f instanceof klass ? f : new klass(f)));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
if (opt.fields) {
|
||||
if (opt.fields) {
|
||||
helper.fill(opt.fields, this.fields, Field);
|
||||
}
|
||||
} else if (opt.items) {
|
||||
if (opt.items) {
|
||||
helper.fill(opt.items, this.items, Item);
|
||||
}
|
||||
_ref1 = this.items;
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
i = _ref1[_i];
|
||||
_ref2 = i.fields;
|
||||
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
|
||||
f = _ref2[_j];
|
||||
if (!(_ref3 = f["var"], __indexOf.call(this.reported, _ref3) >= 0)) {
|
||||
this.reported.push(f["var"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Form.prototype.type = "form";
|
||||
|
||||
Form.prototype.title = null;
|
||||
|
||||
Form.prototype.instructions = null;
|
||||
|
||||
Form.prototype.toXML = function() {
|
||||
var f, i, r, xml, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
|
||||
xml = $build("x", {
|
||||
xmlns: "jabber:x:data",
|
||||
type: this.type
|
||||
});
|
||||
if (this.title) {
|
||||
xml.c("title").t(this.title.toString()).up();
|
||||
}
|
||||
if (this.instructions) {
|
||||
xml.c("instructions").t(this.instructions.toString()).up();
|
||||
}
|
||||
if (this.fields.length > 0) {
|
||||
_ref = this.fields;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
f = _ref[_i];
|
||||
xml.cnode(f.toXML()).up();
|
||||
}
|
||||
} else if (this.items.length > 0) {
|
||||
xml.c("reported");
|
||||
_ref1 = this.reported;
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
r = _ref1[_j];
|
||||
xml.c("field", {
|
||||
"var": r
|
||||
}).up();
|
||||
}
|
||||
xml.up();
|
||||
_ref2 = this.items;
|
||||
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
|
||||
i = _ref2[_k];
|
||||
xml.cnode(i.toXML()).up();
|
||||
}
|
||||
}
|
||||
return xml.tree();
|
||||
};
|
||||
|
||||
Form.prototype.toJSON = function() {
|
||||
var f, i, json, _i, _j, _len, _len1, _ref, _ref1;
|
||||
json = {
|
||||
type: this.type
|
||||
};
|
||||
if (this.title) {
|
||||
json.title = this.title;
|
||||
}
|
||||
if (this.instructions) {
|
||||
json.instructions = this.instructions;
|
||||
}
|
||||
if (this.fields.length > 0) {
|
||||
json.fields = [];
|
||||
_ref = this.fields;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
f = _ref[_i];
|
||||
json.fields.push(f.toJSON());
|
||||
}
|
||||
} else if (this.items.length > 0) {
|
||||
json.items = [];
|
||||
json.reported = this.reported;
|
||||
_ref1 = this.items;
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
i = _ref1[_j];
|
||||
json.items.push(i.toJSON());
|
||||
}
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
Form.prototype.toHTML = function() {
|
||||
var f, form, i, _i, _j, _len, _len1, _ref, _ref1;
|
||||
form = $("<form data-type='" + this.type + "'>");
|
||||
if (this.title) {
|
||||
form.append("<h1>" + this.title + "</h1>");
|
||||
}
|
||||
if (this.instructions) {
|
||||
form.append("<p>" + this.instructions + "</p>");
|
||||
}
|
||||
if (this.fields.length > 0) {
|
||||
_ref = this.fields;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
f = _ref[_i];
|
||||
(helper.createHtmlFieldCouple(f)).appendTo(form);
|
||||
}
|
||||
} else if (this.items.length > 0) {
|
||||
_ref1 = this.items;
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
i = _ref1[_j];
|
||||
($(i.toHTML())).appendTo(form);
|
||||
}
|
||||
}
|
||||
return form[0];
|
||||
};
|
||||
|
||||
Form.fromXML = function(xml) {
|
||||
var f, fields, i, instr, items, j, r, reported, title;
|
||||
xml = $(xml);
|
||||
f = new Form({
|
||||
type: xml.attr("type")
|
||||
});
|
||||
title = xml.find("title");
|
||||
if (title.length === 1) {
|
||||
f.title = title.text();
|
||||
}
|
||||
instr = xml.find("instructions");
|
||||
if (instr.length === 1) {
|
||||
f.instructions = instr.text();
|
||||
}
|
||||
fields = xml.find("field");
|
||||
items = xml.find("item");
|
||||
if (items.length > 0) {
|
||||
f.items = (function() {
|
||||
var _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = items.length; _i < _len; _i++) {
|
||||
i = items[_i];
|
||||
_results.push(Item.fromXML(i));
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
} else if (fields.length > 0) {
|
||||
f.fields = (function() {
|
||||
var _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = fields.length; _i < _len; _i++) {
|
||||
j = fields[_i];
|
||||
_results.push(Field.fromXML(j));
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
}
|
||||
reported = xml.find("reported");
|
||||
if (reported.length === 1) {
|
||||
fields = reported.find("field");
|
||||
f.reported = (function() {
|
||||
var _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = fields.length; _i < _len; _i++) {
|
||||
r = fields[_i];
|
||||
_results.push(($(r)).attr("var"));
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
}
|
||||
return f;
|
||||
};
|
||||
|
||||
Form.fromHTML = function(html) {
|
||||
var f, field, fields, i, instructions, item, items, j, title, _i, _j, _len, _len1, _ref, _ref1, _ref2;
|
||||
html = $(html);
|
||||
f = new Form({
|
||||
type: html.attr("data-type")
|
||||
});
|
||||
title = html.find("h1").text();
|
||||
if (title) {
|
||||
f.title = title;
|
||||
}
|
||||
instructions = html.find("p").text();
|
||||
if (instructions) {
|
||||
f.instructions = instructions;
|
||||
}
|
||||
items = html.find("fieldset");
|
||||
fields = helper.getHtmlFields(html);
|
||||
if (items.length > 0) {
|
||||
f.items = (function() {
|
||||
var _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = items.length; _i < _len; _i++) {
|
||||
i = items[_i];
|
||||
_results.push(Item.fromHTML(i));
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
_ref = f.items;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
item = _ref[_i];
|
||||
_ref1 = item.fields;
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
field = _ref1[_j];
|
||||
if (!(_ref2 = field["var"], __indexOf.call(f.reported, _ref2) >= 0)) {
|
||||
f.reported.push(field["var"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (fields.length > 0) {
|
||||
f.fields = (function() {
|
||||
var _k, _len2, _results;
|
||||
_results = [];
|
||||
for (_k = 0, _len2 = fields.length; _k < _len2; _k++) {
|
||||
j = fields[_k];
|
||||
_results.push(Field.fromHTML(j));
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
}
|
||||
return f;
|
||||
};
|
||||
|
||||
return Form;
|
||||
|
||||
})();
|
||||
|
||||
Field = (function() {
|
||||
Field._types = ["boolean", "fixed", "hidden", "jid-multi", "jid-single", "list-multi", "list-single", "text-multi", "text-private", "text-single"];
|
||||
|
||||
Field._multiTypes = ["list-multi", "jid-multi", "text-multi", "hidden"];
|
||||
|
||||
function Field(opt) {
|
||||
this.toHTML = __bind(this.toHTML, this);
|
||||
this.toXML = __bind(this.toXML, this);
|
||||
this.toJSON = __bind(this.toJSON, this);
|
||||
this.addOptions = __bind(this.addOptions, this);
|
||||
this.addOption = __bind(this.addOption, this);
|
||||
this.addValues = __bind(this.addValues, this);
|
||||
this.addValue = __bind(this.addValue, this);
|
||||
var _ref, _ref1;
|
||||
this.options = [];
|
||||
this.values = [];
|
||||
if (opt) {
|
||||
if (_ref = opt.type, __indexOf.call(Field._types, _ref) >= 0) {
|
||||
this.type = opt.type.toString();
|
||||
}
|
||||
if (opt.desc) {
|
||||
this.desc = opt.desc.toString();
|
||||
}
|
||||
if (opt.label) {
|
||||
this.label = opt.label.toString();
|
||||
}
|
||||
this["var"] = ((_ref1 = opt["var"]) != null ? _ref1.toString() : void 0) || "_no_var_was_defined_";
|
||||
this.required = opt.required === true || opt.required === "true";
|
||||
if (opt.options) {
|
||||
this.addOptions(opt.options);
|
||||
}
|
||||
if (opt.value) {
|
||||
opt.values = [opt.value];
|
||||
}
|
||||
if (opt.values) {
|
||||
this.addValues(opt.values);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Field.prototype.type = "text-single";
|
||||
|
||||
Field.prototype.desc = null;
|
||||
|
||||
Field.prototype.label = null;
|
||||
|
||||
Field.prototype["var"] = "_no_var_was_defined_";
|
||||
|
||||
Field.prototype.required = false;
|
||||
|
||||
Field.prototype.addValue = function(val) {
|
||||
return this.addValues([val]);
|
||||
};
|
||||
|
||||
Field.prototype.addValues = function(vals) {
|
||||
var multi, v, _ref;
|
||||
multi = (_ref = this.type, __indexOf.call(Field._multiTypes, _ref) >= 0);
|
||||
if (multi || (!multi && vals.length === 1)) {
|
||||
this.values = __slice.call(this.values).concat(__slice.call((function() {
|
||||
var _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = vals.length; _i < _len; _i++) {
|
||||
v = vals[_i];
|
||||
_results.push(v.toString());
|
||||
}
|
||||
return _results;
|
||||
})()));
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
Field.prototype.addOption = function(opt) {
|
||||
return this.addOptions([opt]);
|
||||
};
|
||||
|
||||
Field.prototype.addOptions = function(opts) {
|
||||
var o;
|
||||
if (this.type === "list-single" || this.type === "list-multi") {
|
||||
if (typeof opts[0] !== "object") {
|
||||
opts = (function() {
|
||||
var _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = opts.length; _i < _len; _i++) {
|
||||
o = opts[_i];
|
||||
_results.push(new Option({
|
||||
value: o.toString()
|
||||
}));
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
}
|
||||
helper.fill(opts, this.options, Option);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
Field.prototype.toJSON = function() {
|
||||
var json, o, _i, _len, _ref;
|
||||
json = {
|
||||
type: this.type,
|
||||
"var": this["var"],
|
||||
required: this.required
|
||||
};
|
||||
if (this.desc) {
|
||||
json.desc = this.desc;
|
||||
}
|
||||
if (this.label) {
|
||||
json.label = this.label;
|
||||
}
|
||||
if (this.values) {
|
||||
json.values = this.values;
|
||||
}
|
||||
if (this.options) {
|
||||
json.options = [];
|
||||
_ref = this.options;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
o = _ref[_i];
|
||||
json.options.push(o.toJSON());
|
||||
}
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
Field.prototype.toXML = function() {
|
||||
var attrs, o, v, xml, _i, _j, _len, _len1, _ref, _ref1;
|
||||
attrs = {
|
||||
type: this.type,
|
||||
"var": this["var"]
|
||||
};
|
||||
if (this.label) {
|
||||
attrs.label = this.label;
|
||||
}
|
||||
xml = $build("field", attrs);
|
||||
if (this.desc) {
|
||||
xml.c("desc").t(this.desc).up();
|
||||
}
|
||||
if (this.required) {
|
||||
xml.c("required").up();
|
||||
}
|
||||
if (this.values) {
|
||||
_ref = this.values;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
v = _ref[_i];
|
||||
xml.c("value").t(v.toString()).up();
|
||||
}
|
||||
}
|
||||
if (this.options) {
|
||||
_ref1 = this.options;
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
o = _ref1[_j];
|
||||
xml.cnode(o.toXML()).up();
|
||||
}
|
||||
}
|
||||
return xml.tree();
|
||||
};
|
||||
|
||||
Field.prototype.toHTML = function() {
|
||||
var el, k, line, o, opt, txt, val, _i, _j, _len, _len1, _ref, _ref1, _ref2;
|
||||
switch (this.type.toLowerCase()) {
|
||||
case 'list-single':
|
||||
case 'list-multi':
|
||||
el = $("<select>");
|
||||
if (this.type === 'list-multi') {
|
||||
el.attr('multiple', 'multiple');
|
||||
}
|
||||
if (this.options.length > 0) {
|
||||
_ref = this.options;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
opt = _ref[_i];
|
||||
if (!(opt)) {
|
||||
continue;
|
||||
}
|
||||
o = $(opt.toHTML());
|
||||
_ref1 = this.values;
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
k = _ref1[_j];
|
||||
if (k.toString() === opt.value.toString()) {
|
||||
o.attr('selected', 'selected');
|
||||
}
|
||||
}
|
||||
o.appendTo(el);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'text-multi':
|
||||
case 'jid-multi':
|
||||
el = $("<textarea>");
|
||||
txt = ((function() {
|
||||
var _k, _len2, _ref2, _results;
|
||||
_ref2 = this.values;
|
||||
_results = [];
|
||||
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
|
||||
line = _ref2[_k];
|
||||
_results.push(line);
|
||||
}
|
||||
return _results;
|
||||
}).call(this)).join('\n');
|
||||
if (txt) {
|
||||
el.text(txt);
|
||||
}
|
||||
break;
|
||||
case 'text-single':
|
||||
case 'boolean':
|
||||
case 'text-private':
|
||||
case 'hidden':
|
||||
case 'fixed':
|
||||
case 'jid-single':
|
||||
el = $("<input>");
|
||||
if (this.values) {
|
||||
el.val(this.values[0]);
|
||||
}
|
||||
switch (this.type.toLowerCase()) {
|
||||
case 'text-single':
|
||||
el.attr('type', 'text');
|
||||
el.attr('placeholder', this.desc);
|
||||
break;
|
||||
case 'boolean':
|
||||
el.attr('type', 'checkbox');
|
||||
val = (_ref2 = this.values[0]) != null ? typeof _ref2.toString === "function" ? _ref2.toString() : void 0 : void 0;
|
||||
if (val && (val === "true" || val === "1")) {
|
||||
el.attr('checked', 'checked');
|
||||
}
|
||||
break;
|
||||
case 'text-private':
|
||||
el.attr('type', 'password');
|
||||
break;
|
||||
case 'hidden':
|
||||
el.attr('type', 'hidden');
|
||||
break;
|
||||
case 'fixed':
|
||||
el.attr('type', 'text').attr('readonly', 'readonly');
|
||||
break;
|
||||
case 'jid-single':
|
||||
el.attr('type', 'email');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
el = $("<input type='text'>");
|
||||
}
|
||||
el.attr('name', this["var"]);
|
||||
if (this.required) {
|
||||
el.attr('required', this.required);
|
||||
}
|
||||
return el[0];
|
||||
};
|
||||
|
||||
Field.fromXML = function(xml) {
|
||||
var o, v;
|
||||
xml = $(xml);
|
||||
return new Field({
|
||||
type: xml.attr("type"),
|
||||
"var": xml.attr("var"),
|
||||
label: xml.attr("label"),
|
||||
desc: xml.find("desc").text(),
|
||||
required: xml.find("required").length === 1,
|
||||
values: (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = xml.find(">value");
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
v = _ref[_i];
|
||||
_results.push(($(v)).text());
|
||||
}
|
||||
return _results;
|
||||
})(),
|
||||
options: (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = xml.find("option");
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
o = _ref[_i];
|
||||
_results.push(Option.fromXML(o));
|
||||
}
|
||||
return _results;
|
||||
})()
|
||||
});
|
||||
};
|
||||
|
||||
Field._htmlElementToFieldType = function(el) {
|
||||
var r, type;
|
||||
el = $(el);
|
||||
switch (el[0].nodeName.toLowerCase()) {
|
||||
case "textarea":
|
||||
type = "text-multi";
|
||||
break;
|
||||
case "select":
|
||||
if (el.attr("multiple") === "multiple") {
|
||||
type = "list-multi";
|
||||
} else {
|
||||
type = "list-single";
|
||||
}
|
||||
break;
|
||||
case "input":
|
||||
switch (el.attr("type")) {
|
||||
case "checkbox":
|
||||
type = "boolean";
|
||||
break;
|
||||
case "email":
|
||||
type = "jid-single";
|
||||
break;
|
||||
case "hidden":
|
||||
type = "hidden";
|
||||
break;
|
||||
case "password":
|
||||
type = "text-private";
|
||||
break;
|
||||
case "text":
|
||||
r = el.attr("readonly") === "readonly";
|
||||
if (r) {
|
||||
type = "fixed";
|
||||
} else {
|
||||
type = "text-single";
|
||||
}
|
||||
}
|
||||
}
|
||||
return type;
|
||||
};
|
||||
|
||||
Field.fromHTML = function(html) {
|
||||
var el, f, txt, type;
|
||||
html = $(html);
|
||||
type = Field._htmlElementToFieldType(html);
|
||||
f = new Field({
|
||||
type: type,
|
||||
"var": html.attr("name"),
|
||||
required: html.attr("required") === "required"
|
||||
});
|
||||
switch (type) {
|
||||
case "list-multi":
|
||||
case "list-single":
|
||||
f.values = (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = html.find("option:selected");
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
el = _ref[_i];
|
||||
_results.push(($(el)).val());
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
f.options = (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = html.find("option");
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
el = _ref[_i];
|
||||
_results.push(Option.fromHTML(el));
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
break;
|
||||
case "text-multi":
|
||||
case "jid-multi":
|
||||
txt = html.text();
|
||||
if (txt.trim() !== "") {
|
||||
f.values = txt.split('\n');
|
||||
}
|
||||
break;
|
||||
case 'text-single':
|
||||
case 'boolean':
|
||||
case 'text-private':
|
||||
case 'hidden':
|
||||
case 'fixed':
|
||||
case 'jid-single':
|
||||
if (html.val().trim() !== "") {
|
||||
f.values = [html.val()];
|
||||
}
|
||||
}
|
||||
return f;
|
||||
};
|
||||
|
||||
return Field;
|
||||
|
||||
})();
|
||||
|
||||
Option = (function() {
|
||||
function Option(opt) {
|
||||
this.toHTML = __bind(this.toHTML, this);
|
||||
this.toJSON = __bind(this.toJSON, this);
|
||||
this.toXML = __bind(this.toXML, this);
|
||||
if (opt) {
|
||||
if (opt.label) {
|
||||
this.label = opt.label.toString();
|
||||
}
|
||||
if (opt.value) {
|
||||
this.value = opt.value.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Option.prototype.label = "";
|
||||
|
||||
Option.prototype.value = "";
|
||||
|
||||
Option.prototype.toXML = function() {
|
||||
return $build("option", {
|
||||
label: this.label
|
||||
}).c("value").t(this.value.toString()).tree();
|
||||
};
|
||||
|
||||
Option.prototype.toJSON = function() {
|
||||
return {
|
||||
label: this.label,
|
||||
value: this.value
|
||||
};
|
||||
};
|
||||
|
||||
Option.prototype.toHTML = function() {
|
||||
return ($("<option>")).attr('value', this.value).text(this.label || this.value)[0];
|
||||
};
|
||||
|
||||
Option.fromXML = function(xml) {
|
||||
return new Option({
|
||||
label: ($(xml)).attr("label"),
|
||||
value: ($(xml)).text()
|
||||
});
|
||||
};
|
||||
|
||||
Option.fromHTML = function(html) {
|
||||
return new Option({
|
||||
value: ($(html)).attr("value"),
|
||||
label: ($(html)).text()
|
||||
});
|
||||
};
|
||||
|
||||
return Option;
|
||||
|
||||
})();
|
||||
|
||||
Item = (function() {
|
||||
function Item(opts) {
|
||||
this.toHTML = __bind(this.toHTML, this);
|
||||
this.toJSON = __bind(this.toJSON, this);
|
||||
this.toXML = __bind(this.toXML, this);
|
||||
this.fields = [];
|
||||
if (opts != null ? opts.fields : void 0) {
|
||||
helper.fill(opts.fields, this.fields, Field);
|
||||
}
|
||||
}
|
||||
|
||||
Item.prototype.toXML = function() {
|
||||
var f, xml, _i, _len, _ref;
|
||||
xml = $build("item");
|
||||
_ref = this.fields;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
f = _ref[_i];
|
||||
xml.cnode(f.toXML()).up();
|
||||
}
|
||||
return xml.tree();
|
||||
};
|
||||
|
||||
Item.prototype.toJSON = function() {
|
||||
var f, json, _i, _len, _ref;
|
||||
json = {};
|
||||
if (this.fields) {
|
||||
json.fields = [];
|
||||
_ref = this.fields;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
f = _ref[_i];
|
||||
json.fields.push(f.toJSON());
|
||||
}
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
Item.prototype.toHTML = function() {
|
||||
var f, fieldset, _i, _len, _ref;
|
||||
fieldset = $("<fieldset>");
|
||||
_ref = this.fields;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
f = _ref[_i];
|
||||
(helper.createHtmlFieldCouple(f)).appendTo(fieldset);
|
||||
}
|
||||
return fieldset[0];
|
||||
};
|
||||
|
||||
Item.fromXML = function(xml) {
|
||||
var f, fields;
|
||||
xml = $(xml);
|
||||
fields = xml.find("field");
|
||||
return new Item({
|
||||
fields: (function() {
|
||||
var _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = fields.length; _i < _len; _i++) {
|
||||
f = fields[_i];
|
||||
_results.push(Field.fromXML(f));
|
||||
}
|
||||
return _results;
|
||||
})()
|
||||
});
|
||||
};
|
||||
|
||||
Item.fromHTML = function(html) {
|
||||
var f;
|
||||
return new Item({
|
||||
fields: (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = helper.getHtmlFields(html);
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
f = _ref[_i];
|
||||
_results.push(Field.fromHTML(f));
|
||||
}
|
||||
return _results;
|
||||
})()
|
||||
});
|
||||
};
|
||||
|
||||
return Item;
|
||||
|
||||
})();
|
||||
|
||||
Strophe.x = {
|
||||
Form: Form,
|
||||
Field: Field,
|
||||
Option: Option,
|
||||
Item: Item
|
||||
};
|
||||
|
||||
$form = function(opt) {
|
||||
return new Strophe.x.Form(opt);
|
||||
};
|
||||
|
||||
$field = function(opt) {
|
||||
return new Strophe.x.Field(opt);
|
||||
};
|
||||
|
||||
$opt = function(opt) {
|
||||
return new Strophe.x.Option(opt);
|
||||
};
|
||||
|
||||
$item = function(opts) {
|
||||
return new Strophe.x.Item(opts);
|
||||
};
|
||||
|
||||
Strophe.addConnectionPlugin('x', {
|
||||
init: function(conn) {
|
||||
var _ref, _ref1;
|
||||
Strophe.addNamespace('DATA', 'jabber:x:data');
|
||||
if (((_ref = conn.disco) != null ? _ref.addFeature : void 0) != null) {
|
||||
conn.disco.addFeature(Strophe.NS.DATA);
|
||||
}
|
||||
if (((_ref1 = conn.disco) != null ? _ref1.addNode : void 0) != null) {
|
||||
return conn.disco.addNode(Strophe.NS.DATA, {
|
||||
items: []
|
||||
});
|
||||
}
|
||||
},
|
||||
parseFromResult: function(result) {
|
||||
var _ref;
|
||||
if (result.nodeName.toLowerCase() === "x") {
|
||||
return Form.fromXML(result);
|
||||
} else {
|
||||
return Form.fromXML((_ref = ($(result)).find("x")) != null ? _ref[0] : void 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+16
-10
@@ -25,28 +25,40 @@
|
||||
},
|
||||
{
|
||||
"name": "strophe.js/vcard",
|
||||
"file": "lib/strophe.vcard/index.js",
|
||||
"file": "lib/strophe.vcard/strophe.vcard.js",
|
||||
"license": "MIT",
|
||||
"url": "https://github.com/strophe/strophejs-plugins"
|
||||
},
|
||||
{
|
||||
"name": "strophe.js/bookmarks",
|
||||
"file": "lib/strophe.bookmarks/index.js",
|
||||
"file": "lib/strophe.bookmarks/strophe.bookmarks.js",
|
||||
"license": "MIT",
|
||||
"url": "https://github.com/strophe/strophejs-plugins/tree/master/bookmarks"
|
||||
},
|
||||
{
|
||||
"name": "strophe.js/x",
|
||||
"file": "lib/strophe.x/index.js",
|
||||
"file": "lib/strophe.x/src/strophe.x.js",
|
||||
"license": "MIT",
|
||||
"url": "https://github.com/strophe/strophejs-plugins/tree/master/dataforms"
|
||||
},
|
||||
{
|
||||
"name": "strophe.js/chatstates",
|
||||
"file": "lib/strophe.chatstates/index.js",
|
||||
"file": "lib/strophe.chatstates/strophe.chatstates.js",
|
||||
"license": "MIT",
|
||||
"url": "https://github.com/strophe/strophejs-plugins/tree/master/chatstates"
|
||||
},
|
||||
{
|
||||
"name": "strophe.js/mam",
|
||||
"file": "lib/strophejs-plugin-mam/strophe.mam.js",
|
||||
"license": "MIT",
|
||||
"url": "https://github.com/strophe/strophejs-plugin-mam"
|
||||
},
|
||||
{
|
||||
"name": "strophe.js/rsm",
|
||||
"file": "lib/strophejs-plugin-rsm/strophe.rsm.js",
|
||||
"license": "MIT",
|
||||
"url": "https://github.com/strophe/strophejs-plugin-rsm"
|
||||
},
|
||||
{
|
||||
"name": "strophe.jinglejs",
|
||||
"file": "lib/strophe.jinglejs/strophe.jinglejs-bundle.js",
|
||||
@@ -101,12 +113,6 @@
|
||||
"license": "MIT",
|
||||
"url": "http://dimsemenov.com/plugins/magnific-popup/"
|
||||
},
|
||||
{
|
||||
"name": null,
|
||||
"file": "lib/translation.js",
|
||||
"license": "MIT",
|
||||
"url": "https://webtranslateit.com/en/projects/10365-JSXC"
|
||||
},
|
||||
{
|
||||
"name": "favico.js",
|
||||
"file": "lib/favico.js/favico.js",
|
||||
|
||||
+5
-5
@@ -160,7 +160,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.Message.js.html">jsxc.lib.Message.js</a>, <a href="jsxc.lib.Message.js.html#line236">line 236</a>
|
||||
<a href="jsxc.lib.Message.js.html">jsxc.lib.Message.js</a>, <a href="jsxc.lib.Message.js.html#line238">line 238</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line214">line 214</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line212">line 212</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line181">line 181</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line179">line 179</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -452,13 +452,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+2
-2
@@ -50,13 +50,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+1644
-1644
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -73,7 +73,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1890">line 1890</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1878">line 1878</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ otherwise only dialog with given name is closed.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1975">line 1975</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1963">line 1963</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ otherwise only dialog with given name is closed.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1905">line 1905</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1893">line 1893</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -610,7 +610,7 @@ otherwise only dialog with given name is closed.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1990">line 1990</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1978">line 1978</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -652,13 +652,13 @@ otherwise only dialog with given name is closed.
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+208
-208
@@ -304,7 +304,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1277">line 1277</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1242">line 1242</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -458,7 +458,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1193">line 1193</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1156">line 1156</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -584,7 +584,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1330">line 1330</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1295">line 1295</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -717,7 +717,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line375">line 375</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line311">line 311</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -821,7 +821,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line98">line 98</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line113">line 113</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -947,7 +947,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1299">line 1299</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1264">line 1264</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1073,7 +1073,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line345">line 345</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line281">line 281</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1204,7 +1204,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1437">line 1437</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1409">line 1409</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1308,7 +1308,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line817">line 817</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line760">line 760</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1439,7 +1439,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line765">line 765</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line708">line 708</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1588,7 +1588,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line615">line 615</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line557">line 557</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1670,7 +1670,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line774">line 774</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line717">line 717</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1865,7 +1865,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line798">line 798</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line741">line 741</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2026,7 +2026,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line649">line 649</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line591">line 591</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2108,7 +2108,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line830">line 830</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line773">line 773</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2239,7 +2239,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line481">line 481</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line423">line 423</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2321,7 +2321,184 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line428">line 428</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line364">line 364</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".showNotification"><span class="type-signature">(static) </span>showNotification<span class="signature">(subject, body, from)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Show notification dialog.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>subject</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">String</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>body</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">String</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>from</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">String</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1136">line 1136</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2452,7 +2629,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line725">line 725</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line668">line 668</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2552,7 +2729,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1083">line 1083</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1026">line 1026</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2683,7 +2860,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line862">line 862</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line805">line 805</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2814,7 +2991,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line490">line 490</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line432">line 432</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2896,7 +3073,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line1028">line 1028</a>
|
||||
<a href="jsxc.lib.webrtc.js.html">jsxc.lib.webrtc.js</a>, <a href="jsxc.lib.webrtc.js.html#line1379">line 1379</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3027,7 +3204,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line753">line 753</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line696">line 696</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3127,7 +3304,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line386">line 386</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line322">line 322</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3258,7 +3435,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line159">line 159</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line176">line 176</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3384,7 +3561,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1249">line 1249</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1214">line 1214</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3515,184 +3692,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line175">line 175</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".updateAvatar"><span class="type-signature">(static) </span>updateAvatar<span class="signature">(el, jid, aid)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Update avatar on all given elements.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>el</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">jQuery</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Elements with subelement .jsxc_avatar</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>jid</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Jid</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>aid</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Avatar id (sha1 hash of image)</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line249">line 249</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line192">line 192</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3841,7 +3841,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1215">line 1215</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1178">line 1178</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3923,7 +3923,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line329">line 329</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line265">line 265</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3965,13 +3965,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line51">line 51</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line52">line 52</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line86">line 86</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line101">line 101</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line58">line 58</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line59">line 59</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line67">line 67</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line82">line 82</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line72">line 72</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line87">line 87</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line81">line 81</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line96">line 96</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -530,13 +530,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+16
-16
@@ -73,7 +73,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1466">line 1466</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1453">line 1453</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1477">line 1477</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1464">line 1464</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1474">line 1474</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1461">line 1461</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1800">line 1800</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1788">line 1788</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1592">line 1592</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1580">line 1580</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -591,7 +591,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1876">line 1876</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1864">line 1864</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -673,7 +673,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1485">line 1485</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1472">line 1472</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -846,7 +846,7 @@ alphabetical of the name
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1680">line 1680</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1668">line 1668</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -946,7 +946,7 @@ alphabetical of the name
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1861">line 1861</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1849">line 1849</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1077,7 +1077,7 @@ alphabetical of the name
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1736">line 1736</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1724">line 1724</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1208,7 +1208,7 @@ alphabetical of the name
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1727">line 1727</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1715">line 1715</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1361,7 +1361,7 @@ alphabetical of the name
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1757">line 1757</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1745">line 1745</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1510,7 +1510,7 @@ alphabetical of the name
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1717">line 1717</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1705">line 1705</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1659,7 +1659,7 @@ alphabetical of the name
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1828">line 1828</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1816">line 1816</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1701,13 +1701,13 @@ alphabetical of the name
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+175
-175
@@ -73,7 +73,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1995">line 1995</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1983">line 1983</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2318">line 2318</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2346">line 2346</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2442">line 2442</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2470">line 2470</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -517,7 +517,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2585">line 2585</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2616">line 2616</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2363">line 2363</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2391">line 2391</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2790">line 2790</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2866">line 2866</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -946,7 +946,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2293">line 2293</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2321">line 2321</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1077,7 +1077,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2268">line 2268</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2296">line 2296</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1242,7 +1242,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2417">line 2417</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2445">line 2445</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1373,7 +1373,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2456">line 2456</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2484">line 2484</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1504,7 +1504,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2008">line 2008</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line1996">line 1996</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1658,7 +1658,7 @@ created.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2279">line 2279</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2307">line 2307</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1711,159 +1711,6 @@ created.
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".postMessage"><span class="type-signature">(static) </span>postMessage<span class="signature">(message)</span><span class="type-signature"> → {<a href="jsxc.Message.html">jsxc.Message</a>}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Write Message to chat area and save. Check border cases and remove html.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>message</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><a href="jsxc.Message.html">jsxc.Message</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">object to be send</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2484">line 2484</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
maybe modified message object
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="jsxc.Message.html">jsxc.Message</a></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".postMessage"><span class="type-signature">(static) </span>postMessage<span class="signature">(args)</span><span class="type-signature"> → {<a href="jsxc.Message.html">jsxc.Message</a>}</span></h4>
|
||||
|
||||
|
||||
@@ -2293,7 +2140,160 @@ and save. Check border cases and remove html.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2492">line 2492</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2520">line 2520</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
maybe modified message object
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="jsxc.Message.html">jsxc.Message</a></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".postMessage"><span class="type-signature">(static) </span>postMessage<span class="signature">(message)</span><span class="type-signature"> → {<a href="jsxc.Message.html">jsxc.Message</a>}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Write Message to chat area and save. Check border cases and remove html.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>message</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><a href="jsxc.Message.html">jsxc.Message</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">object to be send</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2512">line 2512</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2471,7 +2471,7 @@ and save. Check border cases and remove html.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2816">line 2816</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2898">line 2898</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2679,7 +2679,7 @@ and save. Check border cases and remove html.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2199">line 2199</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2227">line 2227</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2810,7 +2810,7 @@ and save. Check border cases and remove html.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2754">line 2754</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2830">line 2830</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2959,7 +2959,7 @@ and save. Check border cases and remove html.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2471">line 2471</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2499">line 2499</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3113,7 +3113,7 @@ and save. Check border cases and remove html.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2744">line 2744</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2811">line 2811</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3262,7 +3262,7 @@ and save. Check border cases and remove html.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2350">line 2350</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2378">line 2378</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3393,7 +3393,7 @@ and save. Check border cases and remove html.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2328">line 2328</a>
|
||||
<a href="jsxc.lib.gui.js.html">jsxc.lib.gui.js</a>, <a href="jsxc.lib.gui.js.html#line2356">line 2356</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3435,13 +3435,13 @@ and save. Check border cases and remove html.
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+166
-101
@@ -110,6 +110,9 @@
|
||||
<h3 class="subsection-title">Namespaces</h3>
|
||||
|
||||
<dl>
|
||||
<dt><a href="jsxc.fileTransfer.html">fileTransfer</a></dt>
|
||||
<dd></dd>
|
||||
|
||||
<dt><a href="jsxc.gui.html">gui</a></dt>
|
||||
<dd></dd>
|
||||
|
||||
@@ -188,7 +191,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line59">line 59</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line56">line 56</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -242,6 +245,130 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line65">line 65</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".currentState"><span class="type-signature">(static) </span>currentState<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Current state
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line59">line 59</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".currentUIState"><span class="type-signature">(static) </span>currentUIState<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Current UI state
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -374,7 +501,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line174">line 174</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line191">line 191</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -436,7 +563,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line47">line 47</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line44">line 44</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -578,68 +705,6 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".reconnect"><span class="type-signature">(static) </span>reconnect<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
True if jid, sid and rid was used to connect
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".restoreCompleted"><span class="type-signature">(static) </span>restoreCompleted<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
@@ -684,7 +749,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line35">line 35</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -809,7 +874,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line53">line 53</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line50">line 50</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1119,7 +1184,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line56">line 56</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line53">line 53</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1181,7 +1246,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line38">line 38</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line35">line 35</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1243,7 +1308,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line41">line 41</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line38">line 38</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1305,7 +1370,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line44">line 44</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line41">line 41</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1506,7 +1571,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line584">line 584</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line620">line 620</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1683,7 +1748,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line121">line 121</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line138">line 138</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1814,7 +1879,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line675">line 675</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line711">line 711</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1986,7 +2051,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line169">line 169</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line186">line 186</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2068,7 +2133,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line778">line 778</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line818">line 818</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2222,7 +2287,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line873">line 873</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line913">line 913</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2363,7 +2428,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line91">line 91</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line108">line 108</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2455,7 +2520,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line849">line 849</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line889">line 889</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2608,7 +2673,7 @@ workaround) 0: conform, 1: not conform, 2: not shure
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line893">line 893</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line933">line 933</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2771,7 +2836,7 @@ Afterwards it performs the following actions in the given order:
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line192">line 192</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line209">line 209</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2853,7 +2918,7 @@ Afterwards it performs the following actions in the given order:
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line821">line 821</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line861">line 861</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2957,7 +3022,7 @@ Afterwards it performs the following actions in the given order:
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line426">line 426</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line462">line 462</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3105,7 +3170,7 @@ Afterwards it performs the following actions in the given order:
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line700">line 700</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line736">line 736</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3246,7 +3311,7 @@ Afterwards it performs the following actions in the given order:
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line685">line 685</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line721">line 721</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3350,7 +3415,7 @@ Afterwards it performs the following actions in the given order:
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line635">line 635</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line671">line 671</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3433,7 +3498,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line646">line 646</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line682">line 682</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3515,7 +3580,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line562">line 562</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line598">line 598</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3597,7 +3662,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line540">line 540</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line580">line 580</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3774,7 +3839,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line438">line 438</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line474">line 474</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3905,7 +3970,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line665">line 665</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line701">line 701</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4053,7 +4118,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line790">line 790</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line830">line 830</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4145,7 +4210,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line707">line 707</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line743">line 743</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4227,7 +4292,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line729">line 729</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line765">line 765</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4404,7 +4469,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line372">line 372</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line408">line 408</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4486,7 +4551,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line628">line 628</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line664">line 664</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4568,7 +4633,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line759">line 759</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line795">line 795</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4722,7 +4787,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line801">line 801</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line841">line 841</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4898,7 +4963,7 @@ normal signal
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line158">line 158</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line175">line 175</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4940,13 +5005,13 @@ normal signal
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* Load message object with given uid.
|
||||
*
|
||||
*
|
||||
* @class Message
|
||||
* @memberOf jsxc
|
||||
* @param {string} uid Unified identifier from message object
|
||||
@@ -62,7 +62,7 @@ jsxc.Message = function() {
|
||||
this._received = false;
|
||||
|
||||
/** @member {boolean} */
|
||||
this.encrypted = false;
|
||||
this.encrypted = null;
|
||||
|
||||
/** @member {boolean} */
|
||||
this.forwarded = false;
|
||||
@@ -70,6 +70,8 @@ jsxc.Message = function() {
|
||||
/** @member {integer} */
|
||||
this.stamp = new Date().getTime();
|
||||
|
||||
this.type = jsxc.Message.PLAIN;
|
||||
|
||||
if (typeof arguments[0] === 'string' && arguments[0].length > 0 && arguments.length === 1) {
|
||||
this._uid = arguments[0];
|
||||
|
||||
@@ -120,7 +122,7 @@ jsxc.Message.prototype.save = function() {
|
||||
}
|
||||
}
|
||||
|
||||
if (Image && this.attachment && this.attachment.type.match(/^image\//i) && this.attachment.data) {
|
||||
if (Image && this.attachment && this.attachment.type.match(/^image\//i) && this.attachment.data && !this.attachment.thumbnail) {
|
||||
var sHeight, sWidth, sx, sy;
|
||||
var dHeight = 100,
|
||||
dWidth = 100;
|
||||
@@ -148,7 +150,7 @@ jsxc.Message.prototype.save = function() {
|
||||
|
||||
ctx.drawImage(img, sx, sy, sWidth, sHeight, 0, 0, dWidth, dHeight);
|
||||
|
||||
this.attachment.thumbnail = canvas.toDataURL();
|
||||
this.attachment.thumbnail = canvas.toDataURL('image/jpeg', 0.3);
|
||||
|
||||
if (this.direction === 'out') {
|
||||
// save storage
|
||||
@@ -185,7 +187,7 @@ jsxc.Message.prototype.save = function() {
|
||||
|
||||
/**
|
||||
* Remove object from storage.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.Message
|
||||
*/
|
||||
jsxc.Message.prototype.delete = function() {
|
||||
@@ -204,7 +206,7 @@ jsxc.Message.prototype.getDOM = function() {
|
||||
|
||||
/**
|
||||
* Mark message as received.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.Message
|
||||
*/
|
||||
jsxc.Message.prototype.received = function() {
|
||||
@@ -244,7 +246,7 @@ jsxc.Message.delete = function(uid) {
|
||||
return el !== uid;
|
||||
});
|
||||
|
||||
jsxc.storage.setUserItem('history', data.bid);
|
||||
jsxc.storage.setUserItem('history', data.bid, history);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -263,7 +265,7 @@ jsxc.Message.getDOM = function(uid) {
|
||||
|
||||
/**
|
||||
* Message direction can be incoming, outgoing or system.
|
||||
*
|
||||
*
|
||||
* @typedef {(jsxc.Message.IN|jsxc.Message.OUT|jsxc.Message.SYS)} direction
|
||||
*/
|
||||
|
||||
@@ -287,6 +289,10 @@ jsxc.Message.OUT = 'out';
|
||||
* @default
|
||||
*/
|
||||
jsxc.Message.SYS = 'sys';
|
||||
|
||||
jsxc.Message.HTML = 'html';
|
||||
|
||||
jsxc.Message.PLAIN = 'plain';
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -297,13 +303,13 @@ jsxc.Message.SYS = 'sys';
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: jsxc.lib.fileTransfer.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: jsxc.lib.fileTransfer.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* @namespace jsxc.fileTransfer
|
||||
* @type {Object}
|
||||
*/
|
||||
jsxc.fileTransfer = {};
|
||||
|
||||
/**
|
||||
* Make bytes more human readable.
|
||||
*
|
||||
* @memberOf jsxc.fileTransfer
|
||||
* @param {Integer} byte
|
||||
* @return {String}
|
||||
*/
|
||||
jsxc.fileTransfer.formatByte = function(byte) {
|
||||
var s = ['', 'KB', 'MB', 'GB', 'TB'];
|
||||
var i;
|
||||
|
||||
for (i = 1; i < s.length; i++) {
|
||||
if (byte < 1024) {
|
||||
break;
|
||||
}
|
||||
byte /= 1024;
|
||||
}
|
||||
|
||||
return (Math.round(byte * 10) / 10) + s[i - 1];
|
||||
};
|
||||
|
||||
/**
|
||||
* Start file transfer dialog.
|
||||
*
|
||||
* @memberOf jsxc.fileTransfer
|
||||
* @param {String} jid
|
||||
*/
|
||||
jsxc.fileTransfer.startGuiAction = function(jid) {
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
var res = Strophe.getResourceFromJid(jid);
|
||||
|
||||
if (!res && !jsxc.xmpp.httpUpload.ready) {
|
||||
if (jsxc.fileTransfer.isWebrtcCapable(bid)) {
|
||||
jsxc.fileTransfer.selectResource(bid, jsxc.fileTransfer.startGuiAction);
|
||||
} else {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('No_proper_file_transfer_method_available')
|
||||
});
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
jsxc.fileTransfer.showFileSelection(jid);
|
||||
};
|
||||
|
||||
/**
|
||||
* Show select dialog for file transfer capable resources.
|
||||
*
|
||||
* @memberOf jsxc.fileTransfer
|
||||
* @param {String} bid
|
||||
* @param {Function} success_cb Called if user selects resource
|
||||
* @param {Function} error_cb Called if no resource was found or selected
|
||||
*/
|
||||
jsxc.fileTransfer.selectResource = function(bid, success_cb, error_cb) {
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
var jid = win.data('jid');
|
||||
var res = Strophe.getResourceFromJid(jid);
|
||||
|
||||
var fileCapableRes = jsxc.webrtc.getCapableRes(jid, jsxc.webrtc.reqFileFeatures);
|
||||
var resources = Object.keys(jsxc.storage.getUserItem('res', bid)) || [];
|
||||
|
||||
if (res === null && resources.length === 1 && fileCapableRes.length === 1) {
|
||||
// only one resource is available and this resource is also capable to receive files
|
||||
res = fileCapableRes[0];
|
||||
jid = bid + '/' + res;
|
||||
|
||||
success_cb(jid);
|
||||
} else if (fileCapableRes.indexOf(res) >= 0) {
|
||||
// currently used resource is capable to receive files
|
||||
success_cb(bid + '/' + res);
|
||||
} else if (fileCapableRes.indexOf(res) < 0) {
|
||||
// show selection dialog
|
||||
jsxc.gui.window.selectResource(bid, $.t('Your_contact_uses_multiple_clients_'), function(data) {
|
||||
if (data.status === 'unavailable') {
|
||||
jsxc.gui.window.hideOverlay(bid);
|
||||
|
||||
if (typeof error_cb === 'function') {
|
||||
error_cb();
|
||||
}
|
||||
} else if (data.status === 'selected') {
|
||||
success_cb(bid + '/' + data.result);
|
||||
}
|
||||
}, fileCapableRes);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Show file selector.
|
||||
*
|
||||
* @memberOf jsxc.fileTransfer
|
||||
* @param {String} jid
|
||||
*/
|
||||
jsxc.fileTransfer.showFileSelection = function(jid) {
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
var msg = $('<div><div><label><input type="file" name="files" /><label></div></div>');
|
||||
msg.addClass('jsxc_chatmessage');
|
||||
|
||||
jsxc.gui.window.showOverlay(bid, msg, true);
|
||||
|
||||
// open file selection for user
|
||||
msg.find('label').click();
|
||||
|
||||
msg.find('[type="file"]').change(function(ev) {
|
||||
var file = ev.target.files[0]; // FileList object
|
||||
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
|
||||
jsxc.fileTransfer.fileSelected(jid, msg, file);
|
||||
});
|
||||
};
|
||||
|
||||
jsxc.fileTransfer.showFileTooLarge = function(bid, file) {
|
||||
var maxSize = jsxc.fileTransfer.formatByte(jsxc.options.get('httpUpload').maxSize);
|
||||
var fileSize = jsxc.fileTransfer.formatByte(file.size);
|
||||
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('File_too_large') + ' (' + fileSize + ' > ' + maxSize + ')'
|
||||
});
|
||||
|
||||
jsxc.gui.window.hideOverlay(bid);
|
||||
};
|
||||
|
||||
/**
|
||||
* Callback for file selector.
|
||||
*
|
||||
* @memberOf jsxc.fileTransfer
|
||||
* @param {String} jid
|
||||
* @param {jQuery} msg jQuery object of temporary file message
|
||||
* @param {File} file selected file
|
||||
*/
|
||||
jsxc.fileTransfer.fileSelected = function(jid, msg, file) {
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
var httpUploadOptions = jsxc.options.get('httpUpload') || {};
|
||||
var maxSize = httpUploadOptions.maxSize || 0;
|
||||
|
||||
if (file.transportMethod !== 'webrtc' && jsxc.xmpp.httpUpload.ready && maxSize >= 0 && file.size > maxSize) {
|
||||
jsxc.debug('File too large for http upload.');
|
||||
|
||||
if (jsxc.fileTransfer.isWebrtcCapable(bid)) {
|
||||
// try data channels
|
||||
file.transportMethod = 'webrtc';
|
||||
|
||||
jsxc.fileTransfer.selectResource(bid, function(jid) {
|
||||
jsxc.fileTransfer.fileSelected(jid, msg, file);
|
||||
}, function() {
|
||||
jsxc.fileTransfer.showFileTooLarge(bid, file);
|
||||
});
|
||||
} else {
|
||||
jsxc.fileTransfer.showFileTooLarge(bid, file);
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (!jsxc.xmpp.httpUpload.ready && Strophe.getResourceFromJid(jid)) {
|
||||
// http upload not available
|
||||
file.transportMethod = 'webrtc';
|
||||
}
|
||||
|
||||
var attachment = $('<div>');
|
||||
attachment.addClass('jsxc_attachment');
|
||||
attachment.addClass('jsxc_' + file.type.replace(/\//, '-'));
|
||||
attachment.addClass('jsxc_' + file.type.replace(/^([^/]+)\/.*/, '$1'));
|
||||
|
||||
msg.empty().append(attachment);
|
||||
|
||||
if (FileReader && file.type.match(/^image\//)) {
|
||||
// show image preview
|
||||
var img = $('<img alt="preview">').attr('title', file.name);
|
||||
img.attr('src', jsxc.options.get('root') + '/img/loading.gif');
|
||||
img.appendTo(attachment);
|
||||
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function() {
|
||||
img.attr('src', reader.result);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
attachment.text(file.name + ' (' + file.size + ' byte)');
|
||||
}
|
||||
|
||||
$('<button>').addClass('jsxc_btn jsxc_btn-primary').text($.t('Send')).click(function() {
|
||||
// user confirmed file transfer
|
||||
jsxc.gui.window.hideOverlay(bid);
|
||||
msg.remove();
|
||||
|
||||
var message = jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: 'out',
|
||||
attachment: {
|
||||
name: file.name,
|
||||
size: file.size,
|
||||
type: file.type,
|
||||
data: (file.type.match(/^image\//)) ? img.attr('src') : null
|
||||
}
|
||||
});
|
||||
|
||||
if (file.transportMethod === 'webrtc') {
|
||||
var sess = jsxc.webrtc.sendFile(jid, file);
|
||||
|
||||
sess.sender.on('progress', function(sent, size) {
|
||||
jsxc.gui.window.updateProgress(message, sent, size);
|
||||
|
||||
if (sent === size) {
|
||||
message.received();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// progress is updated in xmpp.httpUpload.uploadFile
|
||||
jsxc.xmpp.httpUpload.sendFile(file, message);
|
||||
}
|
||||
}).appendTo(msg);
|
||||
|
||||
$('<button>').addClass('jsxc_btn jsxc_btn-default').text($.t('Abort')).click(function() {
|
||||
// user aborted file transfer
|
||||
jsxc.gui.window.hideOverlay(bid);
|
||||
}).appendTo(msg);
|
||||
};
|
||||
|
||||
/**
|
||||
* Enable/disable icons for file transfer.
|
||||
*
|
||||
* @memberOf jsxc.fileTransfer
|
||||
* @param {String} bid
|
||||
*/
|
||||
jsxc.fileTransfer.updateIcons = function(bid) {
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
|
||||
if (!win || win.length === 0 || !jsxc.xmpp.conn) {
|
||||
return;
|
||||
}
|
||||
|
||||
jsxc.debug('Update file transfer icons for ' + bid);
|
||||
|
||||
if (jsxc.xmpp.httpUpload.ready) {
|
||||
win.find('.jsxc_sendFile').removeClass('jsxc_disabled');
|
||||
|
||||
return;
|
||||
} else if (!jsxc.fileTransfer.isWebrtcCapable(bid)) {
|
||||
win.find('.jsxc_sendFile').addClass('jsxc_disabled');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var jid = win.data('jid');
|
||||
var res = Strophe.getResourceFromJid(jid);
|
||||
var fileCapableRes = jsxc.webrtc.getCapableRes(bid, jsxc.webrtc.reqFileFeatures);
|
||||
var resources = Object.keys(jsxc.storage.getUserItem('res', bid) || {}) || [];
|
||||
|
||||
if (fileCapableRes.indexOf(res) > -1 || (res === null && fileCapableRes.length === 1 && resources.length === 1)) {
|
||||
win.find('.jsxc_sendFile').removeClass('jsxc_disabled');
|
||||
} else {
|
||||
win.find('.jsxc_sendFile').addClass('jsxc_disabled');
|
||||
}
|
||||
};
|
||||
|
||||
jsxc.fileTransfer.isWebrtcCapable = function(bid) {
|
||||
return !jsxc.muc.isGroupchat(bid);
|
||||
};
|
||||
|
||||
$(document).on('update.gui.jsxc', function(ev, bid) {
|
||||
jsxc.fileTransfer.updateIcons(bid);
|
||||
});
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,216 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: jsxc.lib.gui.avatar.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: jsxc.lib.gui.avatar.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>jsxc.gui.avatar = {
|
||||
queue: [],
|
||||
|
||||
PLACEHOLDER: 0,
|
||||
|
||||
DELAY: 300,
|
||||
|
||||
CHUNKSIZE: 20,
|
||||
|
||||
timeout: null,
|
||||
|
||||
lastRun: 0
|
||||
};
|
||||
|
||||
/**
|
||||
* Update avatar on all given elements.
|
||||
*
|
||||
* @memberOf jsxc.gui
|
||||
* @param {jQuery} el Elements with subelement .jsxc_avatar
|
||||
* @param {string} jid Jid
|
||||
* @param {string} aid Avatar id (sha1 hash of image)
|
||||
*/
|
||||
jsxc.gui.avatar.update = function(el, jid, aid) {
|
||||
var self = jsxc.gui.avatar;
|
||||
|
||||
if (typeof aid === 'undefined') {
|
||||
self.set(jid, el, self.PLACEHOLDER);
|
||||
return;
|
||||
}
|
||||
|
||||
var avatarSrc = jsxc.storage.getUserItem('avatar', aid);
|
||||
|
||||
if (!jsxc.master && !avatarSrc) {
|
||||
// force avatar placeholder for slave tab, until master tab requested vCard
|
||||
avatarSrc = self.PLACEHOLDER;
|
||||
}
|
||||
|
||||
if (avatarSrc !== null) {
|
||||
self.set(jid, el, avatarSrc);
|
||||
} else {
|
||||
var handler_cb = function(stanza) {
|
||||
var src = jsxc.gui.avatar.getPhotoFromVcard(stanza);
|
||||
|
||||
jsxc.storage.setUserItem('avatar', aid, src);
|
||||
self.set(jid, el, src);
|
||||
};
|
||||
|
||||
var error_cb = function(msg) {
|
||||
jsxc.warn('Could not load vcard.', msg);
|
||||
|
||||
jsxc.storage.setUserItem('avatar', aid, self.PLACEHOLDER);
|
||||
self.set(jid, el, self.PLACEHOLDER);
|
||||
};
|
||||
|
||||
var args = [];
|
||||
|
||||
// workaround for https://github.com/strophe/strophejs/issues/172
|
||||
if (Strophe.getBareJidFromJid(jid) === Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid)) {
|
||||
args = [handler_cb, error_cb];
|
||||
} else {
|
||||
args = [handler_cb, Strophe.getBareJidFromJid(jid), error_cb];
|
||||
}
|
||||
|
||||
jsxc.gui.avatar.queueAction(jid, jsxc.xmpp.conn.vcard.get, args, jsxc.xmpp.conn.vcard);
|
||||
}
|
||||
};
|
||||
|
||||
jsxc.gui.avatar.getPhotoFromVcard = function(stanza) {
|
||||
jsxc.debug('vCard', stanza);
|
||||
|
||||
var vCard = $(stanza).find("vCard > PHOTO");
|
||||
var src;
|
||||
|
||||
if (vCard.length === 0) {
|
||||
jsxc.debug('No photo provided');
|
||||
src = '0';
|
||||
} else if (vCard.find('EXTVAL').length > 0) {
|
||||
src = vCard.find('EXTVAL').text();
|
||||
} else {
|
||||
var img = vCard.find('BINVAL').text();
|
||||
var type = vCard.find('TYPE').text();
|
||||
src = 'data:' + type + ';base64,' + img;
|
||||
}
|
||||
|
||||
// concat chunks
|
||||
src = src.replace(/[\t\r\n\f]/gi, '');
|
||||
|
||||
return src;
|
||||
};
|
||||
|
||||
jsxc.gui.avatar.set = function(jid, el, src) {
|
||||
var self = jsxc.gui.avatar;
|
||||
|
||||
if (src === self.PLACEHOLDER || src === '0') {
|
||||
if (typeof jsxc.options.defaultAvatar === 'function') {
|
||||
jsxc.gui.avatar.queueAction(jid, function() {
|
||||
jsxc.options.defaultAvatar.call(el, jid);
|
||||
});
|
||||
return;
|
||||
}
|
||||
jsxc.gui.avatarPlaceholder(el.find('.jsxc_avatar'), jid);
|
||||
return;
|
||||
}
|
||||
|
||||
el.find('.jsxc_avatar').removeAttr('style');
|
||||
|
||||
el.find('.jsxc_avatar').css({
|
||||
'background-image': 'url(' + src + ')',
|
||||
'text-indent': '999px'
|
||||
});
|
||||
};
|
||||
|
||||
jsxc.gui.avatar.queueAction = function(jid, fn, args, context) {
|
||||
var self = jsxc.gui.avatar;
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
var data = jsxc.storage.getUserItem('buddy', bid) || {};
|
||||
var state = data.status;
|
||||
|
||||
var index = self.queue.indexOf(bid);
|
||||
if (index > -1) {
|
||||
self.queue.splice(index, 1);
|
||||
}
|
||||
|
||||
var action = {
|
||||
fn: fn,
|
||||
args: args || [],
|
||||
context: context || this
|
||||
};
|
||||
|
||||
if (state === 0) {
|
||||
self.queue.push(action);
|
||||
} else {
|
||||
self.queue.unshift(action);
|
||||
}
|
||||
|
||||
jsxc.gui.avatar.processQueue();
|
||||
};
|
||||
|
||||
jsxc.gui.avatar.processQueue = function() {
|
||||
var self = jsxc.gui.avatar;
|
||||
var currentTime = (new Date()).getTime();
|
||||
|
||||
if (currentTime - self.lastRun < self.DELAY) {
|
||||
if (!self.timeout) {
|
||||
self.timeout = setTimeout(self.processQueue, self.DELAY);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
self.lastRun = currentTime;
|
||||
|
||||
var i, action;
|
||||
for (i = 0; i < self.CHUNKSIZE; i++) {
|
||||
if (self.queue.length > 0) {
|
||||
action = self.queue.shift();
|
||||
action.fn.apply(action.context, action.args);
|
||||
}
|
||||
}
|
||||
|
||||
if (self.queue.length > 0) {
|
||||
self.timeout = setTimeout(self.processQueue, self.DELAY);
|
||||
} else {
|
||||
self.timeout = null;
|
||||
}
|
||||
};
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
+202
-210
@@ -71,7 +71,8 @@ jsxc.gui = {
|
||||
':jabber:': ['jabber'],
|
||||
':xmpp:': ['xmpp'],
|
||||
':jsxc:': ['jsxc'],
|
||||
':owncloud:': ['owncloud']
|
||||
':owncloud:': ['owncloud'],
|
||||
':nextcloud:': ['nextcloud']
|
||||
},
|
||||
'emojione': emojione.emojioneList
|
||||
},
|
||||
@@ -84,7 +85,21 @@ jsxc.gui = {
|
||||
queryActions: {
|
||||
/** xmpp:JID?message[;body=TEXT] */
|
||||
message: function(jid, params) {
|
||||
var win = jsxc.gui.window.open(jsxc.jidToBid(jid));
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
|
||||
if (!jsxc.storage.getUserItem('buddy', bid)) {
|
||||
// init contact
|
||||
jsxc.storage.saveBuddy(bid, {
|
||||
jid: jid,
|
||||
name: bid,
|
||||
status: 0,
|
||||
sub: 'none',
|
||||
res: [],
|
||||
rnd: Math.random()
|
||||
});
|
||||
}
|
||||
|
||||
var win = jsxc.gui.window.open(bid);
|
||||
|
||||
if (params && typeof params.body === 'string') {
|
||||
win.find('.jsxc_textinput').val(params.body);
|
||||
@@ -129,6 +144,8 @@ jsxc.gui = {
|
||||
return;
|
||||
}
|
||||
|
||||
jsxc.changeUIState(jsxc.CONST.UISTATE.INITIATING);
|
||||
|
||||
jsxc.gui.regShortNames = new RegExp(emojione.regShortNames.source + '|(' + Object.keys(jsxc.gui.emoticonList.core).join('|') + ')', 'gi');
|
||||
|
||||
$('body').append($(jsxc.gui.template.get('windowList')));
|
||||
@@ -263,90 +280,9 @@ jsxc.gui = {
|
||||
|
||||
ri.find('.jsxc_name').attr('title', info);
|
||||
|
||||
jsxc.gui.updateAvatar(ri.add(we.find('.jsxc_bar')), data.jid, data.avatar);
|
||||
},
|
||||
jsxc.gui.avatar.update(ri.add(we.find('.jsxc_bar')), data.jid, data.avatar);
|
||||
|
||||
/**
|
||||
* Update avatar on all given elements.
|
||||
*
|
||||
* @memberOf jsxc.gui
|
||||
* @param {jQuery} el Elements with subelement .jsxc_avatar
|
||||
* @param {string} jid Jid
|
||||
* @param {string} aid Avatar id (sha1 hash of image)
|
||||
*/
|
||||
updateAvatar: function(el, jid, aid) {
|
||||
|
||||
var setAvatar = function(src) {
|
||||
if (src === 0 || src === '0') {
|
||||
if (typeof jsxc.options.defaultAvatar === 'function') {
|
||||
jsxc.options.defaultAvatar.call(el, jid);
|
||||
return;
|
||||
}
|
||||
jsxc.gui.avatarPlaceholder(el.find('.jsxc_avatar'), jid);
|
||||
return;
|
||||
}
|
||||
|
||||
el.find('.jsxc_avatar').removeAttr('style');
|
||||
|
||||
el.find('.jsxc_avatar').css({
|
||||
'background-image': 'url(' + src + ')',
|
||||
'text-indent': '999px'
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof aid === 'undefined') {
|
||||
setAvatar(0);
|
||||
return;
|
||||
}
|
||||
|
||||
var avatarSrc = jsxc.storage.getUserItem('avatar', aid);
|
||||
|
||||
if (!jsxc.master && !avatarSrc) {
|
||||
// force avatar placeholder for slave tab, until master tab requested vCard
|
||||
avatarSrc = 0;
|
||||
}
|
||||
|
||||
if (avatarSrc !== null) {
|
||||
setAvatar(avatarSrc);
|
||||
} else {
|
||||
var handler_cb = function(stanza) {
|
||||
jsxc.debug('vCard', stanza);
|
||||
|
||||
var vCard = $(stanza).find("vCard > PHOTO");
|
||||
var src;
|
||||
|
||||
if (vCard.length === 0) {
|
||||
jsxc.debug('No photo provided');
|
||||
src = '0';
|
||||
} else if (vCard.find('EXTVAL').length > 0) {
|
||||
src = vCard.find('EXTVAL').text();
|
||||
} else {
|
||||
var img = vCard.find('BINVAL').text();
|
||||
var type = vCard.find('TYPE').text();
|
||||
src = 'data:' + type + ';base64,' + img;
|
||||
}
|
||||
|
||||
// concat chunks
|
||||
src = src.replace(/[\t\r\n\f]/gi, '');
|
||||
|
||||
jsxc.storage.setUserItem('avatar', aid, src);
|
||||
setAvatar(src);
|
||||
};
|
||||
|
||||
var error_cb = function(msg) {
|
||||
jsxc.warn('Could not load vcard.', msg);
|
||||
|
||||
jsxc.storage.setUserItem('avatar', aid, 0);
|
||||
setAvatar(0);
|
||||
};
|
||||
|
||||
// workaround for https://github.com/strophe/strophejs/issues/172
|
||||
if (Strophe.getBareJidFromJid(jid) === Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid)) {
|
||||
jsxc.xmpp.conn.vcard.get(handler_cb, error_cb);
|
||||
} else {
|
||||
jsxc.xmpp.conn.vcard.get(handler_cb, Strophe.getBareJidFromJid(jid), error_cb);
|
||||
}
|
||||
}
|
||||
$(document).trigger('update.gui.jsxc', [bid]);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -454,9 +390,15 @@ jsxc.gui = {
|
||||
* Creates and show loginbox
|
||||
*/
|
||||
showLoginBox: function() {
|
||||
// Set focus to password field
|
||||
$(document).on("complete.dialog.jsxc", function() {
|
||||
$('#jsxc_password').focus();
|
||||
// Set focus to username or password field
|
||||
$(document).one("complete.dialog.jsxc", function() {
|
||||
setTimeout(function() {
|
||||
if ($("#jsxc_username").val().length === 0) {
|
||||
$("#jsxc_username").focus();
|
||||
} else {
|
||||
$('#jsxc_password').focus();
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
|
||||
jsxc.gui.dialog.open(jsxc.gui.template.get('loginBox'));
|
||||
@@ -690,6 +632,7 @@ jsxc.gui = {
|
||||
|
||||
if (val !== '') {
|
||||
jsxc.options.getUsers.call(this, val, function(list) {
|
||||
$('#jsxc_userlist').empty();
|
||||
$.each(list || {}, function(uid, displayname) {
|
||||
var option = $('<option>');
|
||||
option.attr('data-username', uid);
|
||||
@@ -893,7 +836,7 @@ jsxc.gui = {
|
||||
|
||||
var data = jsxc.storage.getUserItem('buddy', bid);
|
||||
|
||||
if (data) {
|
||||
if (data && data.res) {
|
||||
// Display resources and corresponding information
|
||||
var i, j, res, identities, identity = null,
|
||||
cap, client;
|
||||
@@ -1211,6 +1154,26 @@ jsxc.gui = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Show notification dialog.
|
||||
*
|
||||
* @param {String} subject
|
||||
* @param {String} body
|
||||
* @param {String} from
|
||||
*/
|
||||
showNotification: function(subject, body, from) {
|
||||
var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('notification'));
|
||||
|
||||
dialog.find('h3').text(subject);
|
||||
dialog.find('.jsxc_msg').text(body);
|
||||
|
||||
if (from) {
|
||||
dialog.find('.jsxc_meta').text($.t('from') + ' ' + from);
|
||||
} else {
|
||||
dialog.find('.jsxc_meta').hide();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Change own presence to pres.
|
||||
*
|
||||
@@ -1260,10 +1223,12 @@ jsxc.gui = {
|
||||
|
||||
el.attr('data-status', pres);
|
||||
|
||||
if (el.find('.jsxc_avatar').length > 0) {
|
||||
el = el.find('.jsxc_avatar');
|
||||
if (!el.hasClass('jsxc_statusIndicator')) {
|
||||
el = el.find('.jsxc_statusIndicator');
|
||||
}
|
||||
|
||||
el.attr('data-status', pres);
|
||||
|
||||
el.removeClass('jsxc_' + jsxc.CONST.STATUS.join(' jsxc_')).addClass('jsxc_' + pres);
|
||||
});
|
||||
},
|
||||
@@ -1365,6 +1330,9 @@ jsxc.gui = {
|
||||
var jid = href.split('?')[0];
|
||||
var action, params = {};
|
||||
|
||||
element.attr('data-bid', jsxc.jidToBid(jid));
|
||||
jsxc.gui.update(jsxc.jidToBid(jid));
|
||||
|
||||
if (href.indexOf('?') < 0) {
|
||||
action = 'message';
|
||||
} else {
|
||||
@@ -1386,7 +1354,11 @@ jsxc.gui = {
|
||||
element.off('click').click(function(ev) {
|
||||
ev.stopPropagation();
|
||||
|
||||
jsxc.gui.queryActions[action].call(jsxc, jid, params);
|
||||
if (jsxc.xmpp.conn && jsxc.xmpp.conn.connected) {
|
||||
jsxc.gui.queryActions[action].call(jsxc, jid, params);
|
||||
} else {
|
||||
jsxc.gui.showNotification($.t('no_connection'), $.t('You_have_to_go_online_'));
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
@@ -1474,7 +1446,7 @@ jsxc.gui = {
|
||||
filename = jsxc.gui.emoticonList.core[shortname][jsxc.gui.emoticonList.core[shortname].length - 1].replace(/^:([^:]+):$/, '$1');
|
||||
src = jsxc.options.root + '/img/emotions/' + filename + '.svg';
|
||||
} else if (jsxc.gui.emoticonList.emojione[shortname]) {
|
||||
filename = jsxc.gui.emoticonList.emojione[shortname][jsxc.gui.emoticonList.emojione[shortname].length - 1];
|
||||
filename = jsxc.gui.emoticonList.emojione[shortname].fname;
|
||||
src = jsxc.options.root + '/lib/emojione/assets/svg/' + filename + '.svg';
|
||||
}
|
||||
|
||||
@@ -1487,7 +1459,22 @@ jsxc.gui = {
|
||||
return div.prop('outerHTML');
|
||||
});
|
||||
|
||||
var obj = $('<div>' + str + '</div>');
|
||||
if (obj.find('.jsxc_emoticon').length === 1 && obj.text().replace(/ /, '').length === 0 && obj.find('*').length === 1) {
|
||||
obj.find('.jsxc_emoticon').addClass('jsxc_large');
|
||||
str = obj.prop('outerHTML');
|
||||
}
|
||||
|
||||
return str;
|
||||
},
|
||||
|
||||
restore: function() {
|
||||
jsxc.restoreRoster();
|
||||
jsxc.restoreWindows();
|
||||
jsxc.restoreCompleted = true;
|
||||
|
||||
$(document).trigger('restoreCompleted.jsxc');
|
||||
jsxc.changeUIState(jsxc.CONST.UISTATE.READY);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1609,7 +1596,8 @@ jsxc.gui.roster = {
|
||||
jsxc.notice.load();
|
||||
|
||||
jsxc.gui.roster.ready = true;
|
||||
$(document).trigger('ready.roster.jsxc');
|
||||
$(document).trigger('ready.roster.jsxc', [rosterState]);
|
||||
$(document).trigger('ready-roster-jsxc', [rosterState]);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1684,7 +1672,7 @@ jsxc.gui.roster = {
|
||||
while (history.length > i) {
|
||||
var message = new jsxc.Message(history[i]);
|
||||
if (message.direction !== jsxc.Message.SYS) {
|
||||
$('[data-bid="' + bid + '"]').find('.jsxc_lastmsg .jsxc_text').html(message.msg);
|
||||
jsxc.gui.window.setLastMsg(bid, message.msg);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
@@ -2064,6 +2052,9 @@ jsxc.gui.window = {
|
||||
};
|
||||
|
||||
win.find('.jsxc_more').click(expandClick);
|
||||
win.find('.jsxc_menu').click(function() {
|
||||
$('body').click();
|
||||
});
|
||||
|
||||
win.find('.jsxc_verification').click(function() {
|
||||
jsxc.gui.showVerification(bid);
|
||||
@@ -2092,6 +2083,10 @@ jsxc.gui.window = {
|
||||
win.find('.jsxc_sendFile').click(function() {
|
||||
$('body').click();
|
||||
|
||||
if ($(this).hasClass('jsxc_disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
jsxc.gui.window.sendFile(bid);
|
||||
});
|
||||
|
||||
@@ -2099,11 +2094,19 @@ jsxc.gui.window = {
|
||||
return false;
|
||||
});
|
||||
|
||||
var textinputBlurTimeout;
|
||||
win.find('.jsxc_textinput').keyup(function(ev) {
|
||||
var body = $(this).val();
|
||||
|
||||
if (ev.which === 13) {
|
||||
// I'm composing a message
|
||||
if (ev.which !== 13) {
|
||||
jsxc.xmpp.chatState.startComposing(bid);
|
||||
}
|
||||
|
||||
if (ev.which === 13 && !ev.shiftKey) {
|
||||
body = '';
|
||||
|
||||
jsxc.xmpp.chatState.endComposing(bid);
|
||||
}
|
||||
|
||||
jsxc.storage.updateUserItem('window', bid, 'text', body);
|
||||
@@ -2112,7 +2115,8 @@ jsxc.gui.window = {
|
||||
jsxc.gui.window.close(bid);
|
||||
}
|
||||
}).keypress(function(ev) {
|
||||
if (ev.which !== 13 || !$(this).val()) {
|
||||
if (ev.which !== 13 || ev.shiftKey || !$(this).val()) {
|
||||
resizeTextarea.call(this);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2122,16 +2126,40 @@ jsxc.gui.window = {
|
||||
msg: $(this).val()
|
||||
});
|
||||
|
||||
$(this).val('');
|
||||
$(this).css('height', '').val('');
|
||||
|
||||
ev.preventDefault();
|
||||
}).focus(function() {
|
||||
if (textinputBlurTimeout) {
|
||||
clearTimeout(textinputBlurTimeout);
|
||||
}
|
||||
|
||||
// remove unread flag
|
||||
jsxc.gui.readMsg(bid);
|
||||
|
||||
resizeTextarea.call(this);
|
||||
}).blur(function() {
|
||||
var self = $(this);
|
||||
|
||||
textinputBlurTimeout = setTimeout(function() {
|
||||
self.css('height', '');
|
||||
}, 1200);
|
||||
}).mouseenter(function() {
|
||||
$('#jsxc_windowList').data('isOver', true);
|
||||
}).mouseleave(function() {
|
||||
$('#jsxc_windowList').data('isOver', false);
|
||||
});
|
||||
|
||||
function resizeTextarea() {
|
||||
if (!$(this).data('originalHeight')) {
|
||||
$(this).data('originalHeight', $(this).outerHeight());
|
||||
}
|
||||
// compensate rounding error
|
||||
if ($(this).outerHeight() < (this.scrollHeight - 1) && $(this).val()) {
|
||||
$(this).height($(this).data('originalHeight') * 1.5);
|
||||
}
|
||||
}
|
||||
|
||||
win.find('.jsxc_textarea').click(function() {
|
||||
// check if user clicks element or selects text
|
||||
if (typeof getSelection === 'function' && !getSelection().toString()) {
|
||||
@@ -2191,8 +2219,8 @@ jsxc.gui.window = {
|
||||
li.append(jsxc.gui.shortnameToImage(':' + val[1] + ':'));
|
||||
li.find('div').attr('title', ins);
|
||||
li.click(function() {
|
||||
win.find('input').val(win.find('input').val() + ins);
|
||||
win.find('input').focus();
|
||||
win.find('.jsxc_textinput').val(win.find('.jsxc_textinput').val() + ins);
|
||||
win.find('.jsxc_textinput').focus();
|
||||
});
|
||||
win.find('.jsxc_emoticons ul').prepend(li);
|
||||
});
|
||||
@@ -2545,7 +2573,10 @@ jsxc.gui.window = {
|
||||
}
|
||||
|
||||
var data = jsxc.storage.getUserItem('buddy', message.bid);
|
||||
var html_msg = message.msg;
|
||||
|
||||
if (!message.htmlMsg && message.msg) {
|
||||
message.htmlMsg = message.msg;
|
||||
}
|
||||
|
||||
// remove html tags and reencode html tags
|
||||
message.msg = jsxc.removeHTML(message.msg);
|
||||
@@ -2563,7 +2594,7 @@ jsxc.gui.window = {
|
||||
message.msg = $.t('unencrypted_message_received') + ' ' + message.msg;
|
||||
}
|
||||
|
||||
message.encrypted = message.encrypted || data.msgstate === OTR.CONST.MSGSTATE_ENCRYPTED;
|
||||
message.encrypted = (typeof message.encrypted === 'boolean') ? message.encrypted : data.msgstate === OTR.CONST.MSGSTATE_ENCRYPTED;
|
||||
|
||||
try {
|
||||
message.save();
|
||||
@@ -2579,11 +2610,11 @@ jsxc.gui.window = {
|
||||
if (message.direction === 'in' && !jsxc.gui.window.get(message.bid).find('.jsxc_textinput').is(":focus")) {
|
||||
jsxc.gui.unreadMsg(message.bid);
|
||||
|
||||
$(document).trigger('postmessagein.jsxc', [message.bid, html_msg]);
|
||||
$(document).trigger('postmessagein.jsxc', [message.bid, message.htmlMsg]);
|
||||
}
|
||||
|
||||
if (message.direction === jsxc.Message.OUT && jsxc.master && message.forwarded !== true && html_msg) {
|
||||
jsxc.xmpp.sendMessage(message.bid, html_msg, message._uid);
|
||||
if (message.direction === jsxc.Message.OUT && jsxc.master && message.forwarded !== true && message.htmlMsg) {
|
||||
jsxc.xmpp.sendMessage(message);
|
||||
}
|
||||
|
||||
jsxc.gui.window._postMessage(message);
|
||||
@@ -2654,6 +2685,17 @@ jsxc.gui.window = {
|
||||
// replace line breaks
|
||||
msg = msg.replace(/(\r\n|\r|\n)/g, '<br />');
|
||||
|
||||
// replace /me command (XEP-0245)
|
||||
var bidData = jsxc.storage.getUserItem('buddy', bid) || {};
|
||||
if (direction === 'in') {
|
||||
msg = msg.replace(/^\/me /, '<i title="/me">' + jsxc.removeHTML(bidData.name || bid) + '</i> ');
|
||||
}
|
||||
|
||||
// hide unprocessed otr messages
|
||||
if (msg.match(/^\?OTR([:,|?]|[?v0-9x]+)/)) {
|
||||
msg = '<i title="' + msg + '">' + $.t('Unreadable_OTR_message') + '</i>';
|
||||
}
|
||||
|
||||
var msgDiv = $("<div>"),
|
||||
msgTsDiv = $("<div>");
|
||||
msgDiv.addClass('jsxc_chatmessage jsxc_' + direction);
|
||||
@@ -2664,16 +2706,31 @@ jsxc.gui.window = {
|
||||
|
||||
if (message.isReceived() || false) {
|
||||
msgDiv.addClass('jsxc_received');
|
||||
} else {
|
||||
msgDiv.removeClass('jsxc_received');
|
||||
}
|
||||
|
||||
if (message.forwarded) {
|
||||
msgDiv.addClass('jsxc_forwarded');
|
||||
} else {
|
||||
msgDiv.removeClass('jsxc_forwarded');
|
||||
}
|
||||
|
||||
if (message.encrypted) {
|
||||
msgDiv.addClass('jsxc_encrypted');
|
||||
} else {
|
||||
msgDiv.removeClass('jsxc_encrypted');
|
||||
}
|
||||
|
||||
if (message.error) {
|
||||
msgDiv.addClass('jsxc_error');
|
||||
} else {
|
||||
msgDiv.removeClass('jsxc_error');
|
||||
}
|
||||
|
||||
msgDiv.attr('title', message.error);
|
||||
msgDiv.attr('data-error-msg', message.error);
|
||||
|
||||
if (message.attachment && message.attachment.name) {
|
||||
var attachment = $('<div>');
|
||||
attachment.addClass('jsxc_attachment');
|
||||
@@ -2698,6 +2755,10 @@ jsxc.gui.window = {
|
||||
attachment = $('<a>').append(attachment);
|
||||
attachment.attr('href', message.attachment.data);
|
||||
attachment.attr('download', message.attachment.name);
|
||||
|
||||
if (message.attachment.data === message.msg) {
|
||||
msgDiv.find('div').first().empty();
|
||||
}
|
||||
}
|
||||
|
||||
msgDiv.find('div').first().append(attachment);
|
||||
@@ -2710,11 +2771,15 @@ jsxc.gui.window = {
|
||||
}
|
||||
|
||||
if (direction !== 'sys') {
|
||||
$('[data-bid="' + bid + '"]').find('.jsxc_lastmsg .jsxc_text').html(msg);
|
||||
jsxc.gui.window.setLastMsg(bid, msg);
|
||||
}
|
||||
|
||||
if (jsxc.Message.getDOM(uid).length > 0) {
|
||||
jsxc.Message.getDOM(uid).replaceWith(msgDiv);
|
||||
var currentMessageElement = jsxc.Message.getDOM(uid);
|
||||
if (currentMessageElement.length > 0) {
|
||||
if (currentMessageElement.attr('data-queryId')) {
|
||||
msgDiv.attr('data-queryId', currentMessageElement.attr('data-queryId'));
|
||||
}
|
||||
currentMessageElement.replaceWith(msgDiv);
|
||||
} else {
|
||||
win.find('.jsxc_textarea').append(msgDiv);
|
||||
}
|
||||
@@ -2728,7 +2793,7 @@ jsxc.gui.window = {
|
||||
msgDiv.attr('data-bid', jsxc.jidToBid(message.sender.jid));
|
||||
|
||||
var data = jsxc.storage.getUserItem('buddy', jsxc.jidToBid(message.sender.jid)) || {};
|
||||
jsxc.gui.updateAvatar(msgDiv, jsxc.jidToBid(message.sender.jid), data.avatar);
|
||||
jsxc.gui.avatar.update(msgDiv, jsxc.jidToBid(message.sender.jid), data.avatar);
|
||||
|
||||
title = jsxc.jidToBid(message.sender.jid);
|
||||
}
|
||||
@@ -2759,7 +2824,9 @@ jsxc.gui.window = {
|
||||
jsxc.gui.detectUriScheme(win);
|
||||
jsxc.gui.detectEmail(win);
|
||||
|
||||
jsxc.gui.window.scrollDown(bid);
|
||||
if (!message.forwarded) {
|
||||
jsxc.gui.window.scrollDown(bid);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -2773,6 +2840,15 @@ jsxc.gui.window = {
|
||||
jsxc.gui.window.get(bid).find('.jsxc_textinput').val(text);
|
||||
},
|
||||
|
||||
setLastMsg: function(bid, msg) {
|
||||
var lastMsgTextElement = $('[data-bid="' + bid + '"]').find('.jsxc_lastmsg .jsxc_text');
|
||||
|
||||
lastMsgTextElement.html(msg);
|
||||
lastMsgTextElement.find('a').each(function() {
|
||||
$(this).replaceWith('<span>' + $(this).text() + '</span>');
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Load old log into chat area
|
||||
*
|
||||
@@ -2827,10 +2903,16 @@ jsxc.gui.window = {
|
||||
|
||||
jsxc.storage.setUserItem('history', bid, []);
|
||||
|
||||
var buddyData = jsxc.storage.getUserItem('buddy', bid) || {};
|
||||
delete buddyData.lastArchiveUid;
|
||||
delete buddyData.archiveExhausted;
|
||||
jsxc.storage.setUserItem('buddy', bid, buddyData);
|
||||
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
|
||||
if (win.length > 0) {
|
||||
win.find('.jsxc_textarea').empty();
|
||||
win.find('.jsxc_textarea').scroll();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2862,8 +2944,6 @@ jsxc.gui.window = {
|
||||
|
||||
if (sent === size) {
|
||||
span.remove();
|
||||
|
||||
message.received();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2964,99 +3044,7 @@ jsxc.gui.window = {
|
||||
},
|
||||
|
||||
sendFile: function(jid) {
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
var res = Strophe.getResourceFromJid(jid);
|
||||
|
||||
if (!res) {
|
||||
jid = win.data('jid');
|
||||
res = Strophe.getResourceFromJid(jid);
|
||||
|
||||
var fileCapableRes = jsxc.webrtc.getCapableRes(jid, jsxc.webrtc.reqFileFeatures);
|
||||
var resources = Object.keys(jsxc.storage.getUserItem('res', bid)) || [];
|
||||
|
||||
if (res === null && resources.length === 1 && fileCapableRes.length === 1) {
|
||||
res = fileCapableRes[0];
|
||||
jid = bid + '/' + res;
|
||||
} else if (fileCapableRes.indexOf(res) < 0) {
|
||||
jsxc.gui.window.selectResource(bid, $.t('Your_contact_uses_multiple_clients_'), function(data) {
|
||||
if (data.status === 'unavailable') {
|
||||
jsxc.gui.window.hideOverlay(bid);
|
||||
} else if (data.status === 'selected') {
|
||||
jsxc.gui.window.sendFile(bid + '/' + data.result);
|
||||
}
|
||||
}, fileCapableRes);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var msg = $('<div><div><label><input type="file" name="files" /><label></div></div>');
|
||||
msg.addClass('jsxc_chatmessage');
|
||||
|
||||
jsxc.gui.window.showOverlay(bid, msg, true);
|
||||
|
||||
msg.find('label').click();
|
||||
|
||||
msg.find('[type="file"]').change(function(ev) {
|
||||
var file = ev.target.files[0]; // FileList object
|
||||
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
|
||||
var attachment = $('<div>');
|
||||
attachment.addClass('jsxc_attachment');
|
||||
attachment.addClass('jsxc_' + file.type.replace(/\//, '-'));
|
||||
attachment.addClass('jsxc_' + file.type.replace(/^([^/]+)\/.*/, '$1'));
|
||||
|
||||
msg.empty().append(attachment);
|
||||
|
||||
if (FileReader && file.type.match(/^image\//)) {
|
||||
var img = $('<img alt="preview">').attr('title', file.name);
|
||||
img.attr('src', jsxc.options.get('root') + '/img/loading.gif');
|
||||
img.appendTo(attachment);
|
||||
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function() {
|
||||
img.attr('src', reader.result);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
attachment.text(file.name + ' (' + file.size + ' byte)');
|
||||
}
|
||||
|
||||
$('<button>').addClass('jsxc_btn jsxc_btn-primary').text($.t('Send')).click(function() {
|
||||
var sess = jsxc.webrtc.sendFile(jid, file);
|
||||
|
||||
jsxc.gui.window.hideOverlay(bid);
|
||||
|
||||
var message = jsxc.gui.window.postMessage({
|
||||
_uid: sess.sid + ':msg',
|
||||
bid: bid,
|
||||
direction: 'out',
|
||||
attachment: {
|
||||
name: file.name,
|
||||
size: file.size,
|
||||
type: file.type,
|
||||
data: (file.type.match(/^image\//)) ? img.attr('src') : null
|
||||
}
|
||||
});
|
||||
|
||||
sess.sender.on('progress', function(sent, size) {
|
||||
jsxc.gui.window.updateProgress(message, sent, size);
|
||||
});
|
||||
|
||||
msg.remove();
|
||||
|
||||
}).appendTo(msg);
|
||||
|
||||
$('<button>').addClass('jsxc_btn jsxc_btn-default').text($.t('Abort')).click(function() {
|
||||
jsxc.gui.window.hideOverlay(bid);
|
||||
}).appendTo(msg);
|
||||
});
|
||||
jsxc.fileTransfer.startGuiAction(jid);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3090,7 +3078,7 @@ jsxc.gui.template.get = function(name, bid, msg) {
|
||||
$.extend(ph, {
|
||||
bid_priv_fingerprint: (data && data.fingerprint) ? data.fingerprint.replace(/(.{8})/g, '$1 ') : $.t('not_available'),
|
||||
bid_jid: bid,
|
||||
bid_name: (data && data.name) ? data.name : bid
|
||||
bid_name: (data && data.name) ? jsxc.escapeHTML(data.name) : bid
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3107,7 +3095,8 @@ jsxc.gui.template.get = function(name, bid, msg) {
|
||||
// prevent 404
|
||||
ret = ret.replace(/\{\{root\}\}/g, ph.root);
|
||||
|
||||
ret = $(ret);
|
||||
// encapsulate template to find all desired elements in the next step
|
||||
ret = $('<div>' + ret + '</div>');
|
||||
|
||||
ret.find('[data-var]').each(function() {
|
||||
var key = $(this).attr('data-var');
|
||||
@@ -3120,7 +3109,10 @@ jsxc.gui.template.get = function(name, bid, msg) {
|
||||
}
|
||||
});
|
||||
|
||||
ret.i18n();
|
||||
// remove encapsulation
|
||||
ret = ret.find('>*');
|
||||
|
||||
ret.localize(ph);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -3138,13 +3130,13 @@ jsxc.gui.template.get = function(name, bid, msg) {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+83
-27
@@ -56,9 +56,6 @@ jsxc = {
|
||||
/** Interval for keep-alive */
|
||||
keepaliveInterval: null,
|
||||
|
||||
/** True if jid, sid and rid was used to connect */
|
||||
reconnect: false,
|
||||
|
||||
/** True if restore is complete */
|
||||
restoreCompleted: false,
|
||||
|
||||
@@ -86,6 +83,12 @@ jsxc = {
|
||||
/** My bar id */
|
||||
bid: null,
|
||||
|
||||
/** Current state */
|
||||
currentState: null,
|
||||
|
||||
/** Current UI state */
|
||||
currentUIState: null,
|
||||
|
||||
/** Some constants */
|
||||
CONST: {
|
||||
NOTIFICATION_DEFAULT: 'default',
|
||||
@@ -103,10 +106,24 @@ jsxc = {
|
||||
},
|
||||
NS: {
|
||||
CARBONS: 'urn:xmpp:carbons:2',
|
||||
FORWARD: 'urn:xmpp:forward:0'
|
||||
FORWARD: 'urn:xmpp:forward:0',
|
||||
HINTS: 'urn:xmpp:hints'
|
||||
},
|
||||
HIDDEN: 'hidden',
|
||||
SHOWN: 'shown'
|
||||
SHOWN: 'shown',
|
||||
STATE: {
|
||||
INITIATING: 0,
|
||||
PREVCONFOUND: 1,
|
||||
SUSPEND: 2,
|
||||
TRYTOINTERCEPT: 3,
|
||||
INTERCEPTED: 4,
|
||||
ESTABLISHING: 5,
|
||||
READY: 6
|
||||
},
|
||||
UISTATE: {
|
||||
INITIATING: 0,
|
||||
READY: 1
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -218,6 +235,7 @@ jsxc = {
|
||||
* @param {object} options See {@link jsxc.options}
|
||||
*/
|
||||
init: function(options) {
|
||||
jsxc.changeState(jsxc.CONST.STATE.INITIATING);
|
||||
|
||||
if (options && options.loginForm && typeof options.loginForm.attachIfFound === 'boolean' && !options.loginForm.ifFound) {
|
||||
// translate deprated option attachIfFound found to new ifFound
|
||||
@@ -230,8 +248,8 @@ jsxc = {
|
||||
}
|
||||
|
||||
// Check localStorage
|
||||
if (typeof(localStorage) === 'undefined') {
|
||||
jsxc.warn("Browser doesn't support localStorage.");
|
||||
if (!jsxc.storage.hasSupport()) {
|
||||
jsxc.error("Browser doesn't support localStorage. JSXC will be disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -278,15 +296,23 @@ jsxc = {
|
||||
lang = jsxc.options.defaultLang;
|
||||
}
|
||||
|
||||
// initialize i18n translator
|
||||
$.i18n.init({
|
||||
// initialize i18next translator
|
||||
window.i18next.init({
|
||||
lng: lang,
|
||||
fallbackLng: 'en',
|
||||
resStore: I18next,
|
||||
// use localStorage and set expiration to a day
|
||||
useLocalStorage: true,
|
||||
localStorageExpirationTime: 60 * 60 * 24 * 1000,
|
||||
debug: jsxc.storage.getItem('debug') === true
|
||||
resources: I18next,
|
||||
returnNull: false,
|
||||
debug: jsxc.storage.getItem('debug') === true,
|
||||
interpolation: {
|
||||
prefix: '__',
|
||||
suffix: '__'
|
||||
}
|
||||
}, function() {
|
||||
window.jqueryI18next.init(window.i18next, $, {
|
||||
tName: 't',
|
||||
i18nName: 'i18next',
|
||||
handleName: 'localize',
|
||||
});
|
||||
});
|
||||
|
||||
if (jsxc.storage.getItem('debug') === true) {
|
||||
@@ -311,6 +337,7 @@ jsxc = {
|
||||
|
||||
// Looking for a login form
|
||||
if (!jsxc.isLoginForm()) {
|
||||
jsxc.changeState(jsxc.CONST.STATE.SUSPEND);
|
||||
|
||||
if (jsxc.options.displayRosterMinimized()) {
|
||||
// Show minimized roster
|
||||
@@ -322,6 +349,8 @@ jsxc = {
|
||||
return;
|
||||
}
|
||||
|
||||
jsxc.changeState(jsxc.CONST.STATE.TRYTOINTERCEPT);
|
||||
|
||||
if (typeof jsxc.options.formFound === 'function') {
|
||||
jsxc.options.formFound.call();
|
||||
}
|
||||
@@ -343,7 +372,9 @@ jsxc = {
|
||||
form.off('submit');
|
||||
|
||||
// Add jsxc login action to form
|
||||
form.submit(function() {
|
||||
form.submit(function(ev) {
|
||||
ev.preventDefault();
|
||||
|
||||
jsxc.prepareLogin(function(settings) {
|
||||
if (settings !== false) {
|
||||
// settings.xmpp.onlogin is deprecated since v2.1.0
|
||||
@@ -354,19 +385,24 @@ jsxc = {
|
||||
jsxc.options.loginForm.triggered = true;
|
||||
|
||||
jsxc.xmpp.login(jsxc.options.xmpp.jid, jsxc.options.xmpp.password);
|
||||
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
jsxc.submitLoginForm();
|
||||
}
|
||||
|
||||
jsxc.submitLoginForm();
|
||||
});
|
||||
|
||||
// Trigger submit in jsxc.xmpp.connected()
|
||||
return false;
|
||||
});
|
||||
|
||||
jsxc.changeState(jsxc.CONST.STATE.INTERCEPTED);
|
||||
|
||||
} else if (!jsxc.isLoginForm() || (jsxc.options.loginForm && jsxc.options.loginForm.ifFound === 'attach')) {
|
||||
|
||||
// Restore old connection
|
||||
jsxc.changeState(jsxc.CONST.STATE.PREVCONFOUND);
|
||||
|
||||
if (typeof jsxc.storage.getItem('alive') === 'undefined') {
|
||||
jsxc.onMaster();
|
||||
@@ -522,6 +558,10 @@ jsxc = {
|
||||
username = settings.xmpp.username;
|
||||
}
|
||||
|
||||
if (typeof settings.xmpp.password === 'string') {
|
||||
password = settings.xmpp.password;
|
||||
}
|
||||
|
||||
var resource = (settings.xmpp.resource) ? '/' + settings.xmpp.resource : '';
|
||||
var domain = settings.xmpp.domain;
|
||||
var jid;
|
||||
@@ -574,14 +614,10 @@ jsxc = {
|
||||
jsxc.gui.init();
|
||||
$('#jsxc_roster').removeClass('jsxc_noConnection');
|
||||
|
||||
jsxc.restoreRoster();
|
||||
jsxc.restoreWindows();
|
||||
jsxc.restoreCompleted = true;
|
||||
|
||||
jsxc.registerLogout();
|
||||
jsxc.gui.updateAvatar($('#jsxc_roster > .jsxc_bottom'), jsxc.jidToBid(jsxc.storage.getItem('jid')), 'own');
|
||||
jsxc.gui.avatar.update($('#jsxc_roster > .jsxc_bottom'), jsxc.jidToBid(jsxc.storage.getItem('jid')), 'own');
|
||||
|
||||
$(document).trigger('restoreCompleted.jsxc');
|
||||
jsxc.gui.restore();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -647,7 +683,7 @@ jsxc = {
|
||||
jsxc.otr.createDSA();
|
||||
}
|
||||
|
||||
jsxc.gui.updateAvatar($('#jsxc_roster > .jsxc_bottom'), jsxc.jidToBid(jsxc.storage.getItem('jid')), 'own');
|
||||
jsxc.gui.avatar.update($('#jsxc_roster > .jsxc_bottom'), jsxc.jidToBid(jsxc.storage.getItem('jid')), 'own');
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -795,8 +831,12 @@ jsxc = {
|
||||
|
||||
if (form.find('#submit').length > 0) {
|
||||
form.find('#submit').click();
|
||||
} else {
|
||||
} else if (form.get(0) && typeof form.get(0).submit === 'function') {
|
||||
form.submit();
|
||||
} else if (form.find('[type="submit"]').length > 0) {
|
||||
form.find('[type="submit"]').click();
|
||||
} else {
|
||||
jsxc.warn('Could not submit login form.');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -936,6 +976,22 @@ jsxc = {
|
||||
|
||||
isExtraSmallDevice: function() {
|
||||
return $(window).width() < 500;
|
||||
},
|
||||
|
||||
changeState: function(state) {
|
||||
jsxc.currentState = state;
|
||||
|
||||
jsxc.debug('State changed to ' + Object.keys(jsxc.CONST.STATE)[state]);
|
||||
|
||||
$(document).trigger('stateChange.jsxc', state);
|
||||
},
|
||||
|
||||
changeUIState: function(state) {
|
||||
jsxc.currentUIState = state;
|
||||
|
||||
jsxc.debug('UI State changed to ' + Object.keys(jsxc.CONST.UISTATE)[state]);
|
||||
|
||||
$(document).trigger('stateUIChange.jsxc', state);
|
||||
}
|
||||
};
|
||||
</code></pre>
|
||||
@@ -948,13 +1004,13 @@ jsxc = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+126
-106
@@ -117,11 +117,14 @@ jsxc.muc = {
|
||||
$(document).one('ready.roster.jsxc', jsxc.muc.initMenu);
|
||||
}
|
||||
|
||||
// remove maybe previously attached handlers
|
||||
$(document).off('presence.jsxc', jsxc.muc.onPresence);
|
||||
$(document).off('error.presence.jsxc', jsxc.muc.onPresenceError);
|
||||
|
||||
$(document).on('presence.jsxc', jsxc.muc.onPresence);
|
||||
$(document).on('error.presence.jsxc', jsxc.muc.onPresenceError);
|
||||
|
||||
self.conn.addHandler(self.onGroupchatMessage, null, 'message', 'groupchat');
|
||||
self.conn.addHandler(self.onErrorMessage, null, 'message', 'error');
|
||||
self.conn.muc.roomNames = jsxc.storage.getUserItem('roomNames') || [];
|
||||
},
|
||||
|
||||
@@ -135,7 +138,9 @@ jsxc.muc = {
|
||||
|
||||
li.click(jsxc.muc.showJoinChat);
|
||||
|
||||
$('#jsxc_menu ul .jsxc_about').before(li);
|
||||
if ($('#jsxc_menu .jsxc_joinChat').length === 0) {
|
||||
$('#jsxc_menu ul .jsxc_about').before(li);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -149,6 +154,8 @@ jsxc.muc = {
|
||||
var self = jsxc.muc;
|
||||
var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('joinChat'));
|
||||
|
||||
// @TODO split this monster function apart
|
||||
|
||||
// hide second step button
|
||||
dialog.find('.jsxc_join').hide();
|
||||
|
||||
@@ -163,7 +170,27 @@ jsxc.muc = {
|
||||
}
|
||||
|
||||
// display conference server
|
||||
var serverInputTimeout;
|
||||
dialog.find('#jsxc_server').val(jsxc.options.get('muc').server);
|
||||
dialog.find('#jsxc_server').on('input', function() {
|
||||
var self = $(this);
|
||||
|
||||
if (serverInputTimeout) {
|
||||
clearTimeout(serverInputTimeout);
|
||||
dialog.find('.jsxc_inputinfo.jsxc_room').hide();
|
||||
}
|
||||
|
||||
dialog.find('.jsxc_inputinfo.jsxc_server').hide().text('');
|
||||
dialog.find('#jsxc_server').removeClass('jsxc_invalid');
|
||||
|
||||
if (self.val() && self.val().match(/^[.-0-9a-zA-Z]+$/i)) {
|
||||
dialog.find('.jsxc_inputinfo.jsxc_room').show().addClass('jsxc_waiting');
|
||||
|
||||
serverInputTimeout = setTimeout(function() {
|
||||
loadRoomList(self.val());
|
||||
}, 1800);
|
||||
}
|
||||
}).trigger('input');
|
||||
|
||||
// handle error response
|
||||
var error_handler = function(event, condition, room) {
|
||||
@@ -211,7 +238,7 @@ jsxc.muc = {
|
||||
delete self.conn.muc.rooms[room];
|
||||
}
|
||||
|
||||
dialog.find('.jsxc_warning').text(msg);
|
||||
$('<p>').addClass('jsxc_warning').text(msg).appendTo(dialog.find('.jsxc_msg'));
|
||||
};
|
||||
|
||||
$(document).on('error.muc.jsxc', error_handler);
|
||||
@@ -220,42 +247,6 @@ jsxc.muc = {
|
||||
$(document).off('error.muc.jsxc', error_handler);
|
||||
});
|
||||
|
||||
// load room list
|
||||
self.conn.muc.listRooms(jsxc.options.get('muc').server, function(stanza) {
|
||||
// workaround: chrome does not display dropdown arrow for dynamically filled datalists
|
||||
$('#jsxc_roomlist option:last').remove();
|
||||
|
||||
$(stanza).find('item').each(function() {
|
||||
var r = $('<option>');
|
||||
var rjid = $(this).attr('jid').toLowerCase();
|
||||
var rnode = Strophe.getNodeFromJid(rjid);
|
||||
var rname = $(this).attr('name') || rnode;
|
||||
|
||||
r.text(rname);
|
||||
r.attr('data-jid', rjid);
|
||||
r.attr('value', rnode);
|
||||
|
||||
$('#jsxc_roomlist select').append(r);
|
||||
});
|
||||
|
||||
var set = $(stanza).find('set[xmlns="http://jabber.org/protocol/rsm"]');
|
||||
|
||||
if (set.length > 0) {
|
||||
var count = set.find('count').text() || '?';
|
||||
|
||||
dialog.find('.jsxc_inputinfo').removeClass('jsxc_waiting').text($.t('Could_load_only', {
|
||||
count: count
|
||||
}));
|
||||
} else {
|
||||
dialog.find('.jsxc_inputinfo').hide();
|
||||
}
|
||||
}, function() {
|
||||
jsxc.warn('Could not load rooms');
|
||||
|
||||
// room autocompletion is a comfort feature, so it is not necessary to inform the user
|
||||
dialog.find('.jsxc_inputinfo').hide();
|
||||
});
|
||||
|
||||
dialog.find('#jsxc_nickname').attr('placeholder', Strophe.getNodeFromJid(self.conn.jid));
|
||||
|
||||
dialog.find('#jsxc_bookmark').change(function() {
|
||||
@@ -273,7 +264,7 @@ jsxc.muc = {
|
||||
|
||||
var room = ($('#jsxc_room').val()) ? jsxc.jidToBid($('#jsxc_room').val()) : null;
|
||||
var nickname = $('#jsxc_nickname').val() || Strophe.getNodeFromJid(self.conn.jid);
|
||||
var password = $('#jsxc_password').val() || null;
|
||||
var server = dialog.find('#jsxc_server').val();
|
||||
|
||||
if (!room || !room.match(/^[^"&\'\/:<>@\s]+$/i)) {
|
||||
$('#jsxc_room').addClass('jsxc_invalid').keyup(function() {
|
||||
@@ -284,8 +275,12 @@ jsxc.muc = {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dialog.find('#jsxc_server').hasClass('jsxc_invalid')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!room.match(/@(.*)$/)) {
|
||||
room += '@' + jsxc.options.get('muc').server;
|
||||
room += '@' + server;
|
||||
}
|
||||
|
||||
if (jsxc.xmpp.conn.muc.roomNames.indexOf(room) < 0) {
|
||||
@@ -307,6 +302,7 @@ jsxc.muc = {
|
||||
|
||||
var bookmark = $("#jsxc_bookmark").prop("checked");
|
||||
var autojoin = $('#jsxc_autojoin').prop('checked');
|
||||
var password = $('#jsxc_password').val() || null;
|
||||
|
||||
// clean up
|
||||
jsxc.gui.window.clear(room);
|
||||
@@ -329,12 +325,18 @@ jsxc.muc = {
|
||||
$(stanza).find('feature').each(function() {
|
||||
var feature = $(this).attr('var');
|
||||
|
||||
if (feature !== '' && i18n.exists(feature)) {
|
||||
if (feature !== '' && i18next.exists(feature)) {
|
||||
var tr = $('<tr>');
|
||||
$('<td>').text($.t(feature + '.keyword')).appendTo(tr);
|
||||
$('<td>').text($.t(feature + '.description')).appendTo(tr);
|
||||
tr.appendTo(table);
|
||||
}
|
||||
|
||||
if (feature === 'muc_passwordprotected') {
|
||||
dialog.find('#jsxc_password').parents('.form-group').removeClass('jsxc_hidden');
|
||||
dialog.find('#jsxc_password').attr('required', 'required');
|
||||
dialog.find('#jsxc_password').addClass('jsxc_invalid');
|
||||
}
|
||||
});
|
||||
|
||||
dialog.find('.jsxc_msg').append(table);
|
||||
@@ -352,7 +354,7 @@ jsxc.muc = {
|
||||
discoReceived();
|
||||
});
|
||||
} else {
|
||||
dialog.find('.jsxc_warning').text($.t('You_already_joined_this_room'));
|
||||
$('<p>').addClass('jsxc_warning').text($.t('You_already_joined_this_room')).appendTo(dialog.find('.jsxc_msg'));
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -363,12 +365,15 @@ jsxc.muc = {
|
||||
if (ev.which !== 13) {
|
||||
// reset messages and room information
|
||||
|
||||
dialog.find('.jsxc_warning').empty();
|
||||
dialog.find('.jsxc_warning').remove();
|
||||
|
||||
if (dialog.find('.jsxc_continue').is(":hidden")) {
|
||||
if (dialog.find('.jsxc_continue').is(":hidden") && $(this).attr('id') !== 'jsxc_password') {
|
||||
dialog.find('.jsxc_continue').show();
|
||||
dialog.find('.jsxc_join').hide().off('click');
|
||||
dialog.find('.jsxc_msg').empty();
|
||||
dialog.find('#jsxc_password').parents('.form-group').addClass('jsxc_hidden');
|
||||
dialog.find('#jsxc_password').attr('required', '');
|
||||
dialog.find('#jsxc_password').removeClass('jsxc_invalid');
|
||||
jsxc.gui.dialog.resize();
|
||||
}
|
||||
|
||||
@@ -381,6 +386,58 @@ jsxc.muc = {
|
||||
dialog.find('.jsxc_join').click();
|
||||
}
|
||||
});
|
||||
|
||||
function loadRoomList(server) {
|
||||
if (!server) {
|
||||
dialog.find('.jsxc_inputinfo').hide();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// load room list
|
||||
self.conn.muc.listRooms(server, function(stanza) {
|
||||
// workaround: chrome does not display dropdown arrow for dynamically filled datalists
|
||||
$('#jsxc_roomlist option:last').remove();
|
||||
|
||||
$(stanza).find('item').each(function() {
|
||||
var r = $('<option>');
|
||||
var rjid = $(this).attr('jid').toLowerCase();
|
||||
var rnode = Strophe.getNodeFromJid(rjid);
|
||||
var rname = $(this).attr('name') || rnode;
|
||||
|
||||
r.text(rname);
|
||||
r.attr('data-jid', rjid);
|
||||
r.attr('value', rnode);
|
||||
|
||||
$('#jsxc_roomlist select').append(r);
|
||||
});
|
||||
|
||||
var set = $(stanza).find('set[xmlns="http://jabber.org/protocol/rsm"]');
|
||||
|
||||
if (set.length > 0) {
|
||||
var count = set.find('count').text() || '?';
|
||||
|
||||
dialog.find('.jsxc_inputinfo').show().removeClass('jsxc_waiting').text($.t('Could_load_only', {
|
||||
count: count
|
||||
}));
|
||||
} else {
|
||||
dialog.find('.jsxc_inputinfo').hide();
|
||||
}
|
||||
}, function(stanza) {
|
||||
var errTextMsg = $(stanza).find('error text').text() || null;
|
||||
jsxc.warn('Could not load rooms', errTextMsg);
|
||||
|
||||
if (errTextMsg) {
|
||||
dialog.find('.jsxc_inputinfo.jsxc_server').show().text(errTextMsg);
|
||||
}
|
||||
|
||||
if ($(stanza).find('error remote-server-not-found')) {
|
||||
dialog.find('#jsxc_server').addClass('jsxc_invalid');
|
||||
}
|
||||
|
||||
dialog.find('.jsxc_inputinfo.jsxc_room').hide();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -419,8 +476,8 @@ jsxc.muc = {
|
||||
var form = dialog.find('form');
|
||||
|
||||
// work around Strophe.x behaviour
|
||||
form.find('[type="checkbox"]').change(function(){
|
||||
$(this).val(this.checked ? 1 : 0);
|
||||
form.find('[type="checkbox"]').change(function() {
|
||||
$(this).val(this.checked ? 1 : 0);
|
||||
});
|
||||
|
||||
var submit = $('<button>');
|
||||
@@ -725,6 +782,7 @@ jsxc.muc = {
|
||||
});
|
||||
|
||||
var destroy = $('<a>');
|
||||
destroy.attr('href', '#');
|
||||
destroy.text($.t('Destroy'));
|
||||
destroy.addClass('jsxc_destroy');
|
||||
destroy.hide();
|
||||
@@ -735,6 +793,7 @@ jsxc.muc = {
|
||||
win.find('.jsxc_settings ul').append($('<li>').append(destroy));
|
||||
|
||||
var configure = $('<a>');
|
||||
configure.attr('href', '#');
|
||||
configure.text($.t('Configure'));
|
||||
configure.addClass('jsxc_configure');
|
||||
configure.hide();
|
||||
@@ -763,6 +822,7 @@ jsxc.muc = {
|
||||
}
|
||||
|
||||
var leave = $('<a>');
|
||||
leave.attr('href', '#');
|
||||
leave.text($.t('Leave'));
|
||||
leave.addClass('jsxc_leave');
|
||||
leave.click(function() {
|
||||
@@ -796,7 +856,6 @@ jsxc.muc = {
|
||||
var nickname = Strophe.unescapeNode(res);
|
||||
var own = jsxc.storage.getUserItem('ownNicknames') || {};
|
||||
var member = jsxc.storage.getUserItem('member', room) || {};
|
||||
var openWindow = false;
|
||||
var codes = [];
|
||||
|
||||
xdata.find('status').each(function() {
|
||||
@@ -810,6 +869,9 @@ jsxc.muc = {
|
||||
if (roomdata.state === self.CONST.ROOMSTATE.INIT) {
|
||||
// successfully joined
|
||||
|
||||
roomdata.status = jsxc.CONST.STATUS.indexOf('online');
|
||||
jsxc.storage.setUserItem('buddy', room, roomdata);
|
||||
|
||||
jsxc.storage.setUserItem('roomNames', jsxc.xmpp.conn.muc.roomNames);
|
||||
|
||||
if (jsxc.gui.roster.getItem(room).length === 0) {
|
||||
@@ -822,8 +884,9 @@ jsxc.muc = {
|
||||
|
||||
if ($('#jsxc_dialog').length > 0) {
|
||||
// User joined the room manually
|
||||
openWindow = true;
|
||||
jsxc.gui.dialog.close();
|
||||
|
||||
jsxc.gui.window.open(room);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -914,11 +977,6 @@ jsxc.muc = {
|
||||
$(document).trigger('status.muc.jsxc', [code, room, nickname, member[nickname] || {}, presence]);
|
||||
});
|
||||
|
||||
if (openWindow) {
|
||||
// we wait until all parameters are set up correctly (e.g. state)
|
||||
jsxc.gui.window.open(room);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
@@ -1214,15 +1272,14 @@ jsxc.muc = {
|
||||
|
||||
if (typeof jid === 'string') {
|
||||
m.find('.jsxc_name').text(jsxc.jidToBid(jid));
|
||||
m.attr('data-bid', jsxc.jidToBid(jid));
|
||||
title = title + '\n' + jsxc.jidToBid(jid);
|
||||
|
||||
var data = jsxc.storage.getUserItem('buddy', jsxc.jidToBid(jid));
|
||||
|
||||
if (data !== null && typeof data === 'object') {
|
||||
jsxc.gui.updateAvatar(m, jsxc.jidToBid(jid), data.avatar);
|
||||
jsxc.gui.avatar.update(m, jsxc.jidToBid(jid), data.avatar);
|
||||
} else if (jsxc.jidToBid(jid) === ownBid) {
|
||||
jsxc.gui.updateAvatar(m, jsxc.jidToBid(jid), 'own');
|
||||
jsxc.gui.avatar.update(m, jsxc.jidToBid(jid), 'own');
|
||||
}
|
||||
} else {
|
||||
m.find('.jsxc_name').text(nickname);
|
||||
@@ -1362,51 +1419,6 @@ jsxc.muc = {
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle group chat error message.
|
||||
*
|
||||
* @private
|
||||
* @memberOf jsxc.muc
|
||||
* @param {string} message Message stanza
|
||||
*/
|
||||
onErrorMessage: function(message) {
|
||||
var room = jsxc.jidToBid($(message).attr('from'));
|
||||
|
||||
if (jsxc.gui.window.get(room).length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($(message).find('item-not-found').length > 0) {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: room,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send_item-not-found')
|
||||
});
|
||||
} else if ($(message).find('forbidden').length > 0) {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: room,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send_forbidden')
|
||||
});
|
||||
} else if ($(message).find('not-acceptable').length > 0) {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: room,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send_not-acceptable')
|
||||
});
|
||||
} else {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: room,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send')
|
||||
});
|
||||
}
|
||||
|
||||
jsxc.debug('[muc] error message for ' + room, $(message).find('error')[0]);
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Prepare group chat roster item.
|
||||
*
|
||||
@@ -1546,7 +1558,7 @@ jsxc.muc = {
|
||||
}
|
||||
o = $(opt.toHTML());
|
||||
|
||||
for (j = 0; j < self.values; j++) {
|
||||
for (j = 0; j < self.values.length; j++) {
|
||||
k = self.values[j];
|
||||
if (k.toString() === opt.value.toString()) {
|
||||
o.attr('selected', 'selected');
|
||||
@@ -1632,13 +1644,21 @@ jsxc.muc = {
|
||||
|
||||
return html.get(0);
|
||||
}
|
||||
},
|
||||
|
||||
isGroupchat: function(jid) {
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
|
||||
var userData = jsxc.storage.setUserItem('buddy', bid) || {};
|
||||
|
||||
return userData.type === 'groupchat';
|
||||
}
|
||||
};
|
||||
|
||||
$(document).on('init.window.jsxc', jsxc.muc.initWindow);
|
||||
$(document).on('add.roster.jsxc', jsxc.muc.onAddRoster);
|
||||
|
||||
$(document).one('attached.jsxc', function() {
|
||||
$(document).on('attached.jsxc', function() {
|
||||
jsxc.muc.init();
|
||||
});
|
||||
|
||||
@@ -1656,13 +1676,13 @@ $(document).one('connected.jsxc', function() {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* This namespace handle the notice system.
|
||||
*
|
||||
*
|
||||
* @namspace jsxc.notice
|
||||
* @memberOf jsxc
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ jsxc.notice = {
|
||||
|
||||
/**
|
||||
* Loads the saved notices.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notice
|
||||
*/
|
||||
load: function() {
|
||||
@@ -54,25 +54,28 @@ jsxc.notice = {
|
||||
if (saved.hasOwnProperty(key)) {
|
||||
var val = saved[key];
|
||||
|
||||
jsxc.notice.add(val.msg, val.description, val.fnName, val.fnParams, key);
|
||||
jsxc.notice.add(val, val.fnName, val.fnParams, key);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Add a new notice to the stack;
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notice
|
||||
* @param msg Header message
|
||||
* @param description Notice description
|
||||
* @param fnName Function name to be called if you open the notice
|
||||
* @param {Object} data
|
||||
* @param {String} data.msg Header message
|
||||
* @param {String} data.description Notice description
|
||||
* @param {String} fnName Function name to be called if you open the notice
|
||||
* @param fnParams Array of params for function
|
||||
* @param id Notice id
|
||||
* @param {String} id Notice id
|
||||
*/
|
||||
add: function(msg, description, fnName, fnParams, id) {
|
||||
add: function(data, fnName, fnParams, id) {
|
||||
var nid = id || Date.now();
|
||||
var list = $('#jsxc_notice ul');
|
||||
var notice = $('<li/>');
|
||||
var msg = data.msg;
|
||||
var description = data.description;
|
||||
|
||||
notice.click(function() {
|
||||
jsxc.notice.remove(nid);
|
||||
@@ -82,6 +85,10 @@ jsxc.notice = {
|
||||
return false;
|
||||
});
|
||||
|
||||
if (data.type) {
|
||||
notice.addClass('jsxc_' + data.type + 'icon');
|
||||
}
|
||||
|
||||
notice.text(msg);
|
||||
notice.attr('title', description || '');
|
||||
notice.attr('data-nid', nid);
|
||||
@@ -89,11 +96,13 @@ jsxc.notice = {
|
||||
|
||||
$('#jsxc_notice > span').text(++jsxc.notice._num);
|
||||
|
||||
var saved = jsxc.storage.getUserItem('notices') || {};
|
||||
|
||||
if (!id) {
|
||||
var saved = jsxc.storage.getUserItem('notices') || {};
|
||||
saved[nid] = {
|
||||
msg: msg,
|
||||
description: description,
|
||||
type: data.type,
|
||||
fnName: fnName,
|
||||
fnParams: fnParams
|
||||
};
|
||||
@@ -101,11 +110,23 @@ jsxc.notice = {
|
||||
|
||||
jsxc.notification.notify(msg, description || '', null, true, jsxc.CONST.SOUNDS.NOTICE);
|
||||
}
|
||||
|
||||
if (Object.keys(saved).length > 3 && list.find('.jsxc_closeAll').length === 0) {
|
||||
// add close all button
|
||||
var closeAll = $('<li>');
|
||||
closeAll.addClass('jsxc_closeAll jsxc_deleteicon jsxc_warning');
|
||||
closeAll.text($.t('Close_all'));
|
||||
closeAll.prependTo(list);
|
||||
closeAll.click(jsxc.notice.removeAll);
|
||||
} else if (Object.keys(saved).length <= 3 && list.find('.jsxc_closeAll').length !== 0) {
|
||||
// remove close all button
|
||||
list.find('.jsxc_closeAll').remove();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes notice from stack
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notice
|
||||
* @param nid The notice id
|
||||
*/
|
||||
@@ -115,14 +136,30 @@ jsxc.notice = {
|
||||
el.remove();
|
||||
$('#jsxc_notice > span').text(--jsxc.notice._num || '');
|
||||
|
||||
var s = jsxc.storage.getUserItem('notices');
|
||||
var s = jsxc.storage.getUserItem('notices') || {};
|
||||
delete s[nid];
|
||||
jsxc.storage.setUserItem('notices', s);
|
||||
|
||||
if (Object.keys(s).length <= 3 && $('#jsxc_notice .jsxc_closeAll').length !== 0) {
|
||||
// remove close all button
|
||||
$('#jsxc_notice .jsxc_closeAll').remove();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove all notices.
|
||||
*/
|
||||
removeAll: function() {
|
||||
jsxc.notice._num = 0;
|
||||
jsxc.storage.setUserItem('notices', {});
|
||||
|
||||
$('#jsxc_notice ul').empty();
|
||||
$('#jsxc_notice > span').text('');
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if there is already a notice for the given function name.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notice
|
||||
* @param {string} fnName Function name
|
||||
* @returns {boolean} True if there is >0 functions with the given name
|
||||
@@ -152,13 +189,13 @@ jsxc.notice = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* This namespace handles the Notification API.
|
||||
*
|
||||
*
|
||||
* @namespace jsxc.notification
|
||||
*/
|
||||
jsxc.notification = {
|
||||
@@ -38,7 +38,7 @@ jsxc.notification = {
|
||||
|
||||
/**
|
||||
* Register notification on incoming messages.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notification
|
||||
*/
|
||||
init: function() {
|
||||
@@ -67,7 +67,7 @@ jsxc.notification = {
|
||||
|
||||
/**
|
||||
* Shows a pop up notification and optional play sound.
|
||||
*
|
||||
*
|
||||
* @param title Title
|
||||
* @param msg Message
|
||||
* @param d Duration
|
||||
@@ -136,7 +136,7 @@ jsxc.notification = {
|
||||
/**
|
||||
* Checks if browser has support for notifications and add on chrome to the
|
||||
* default api.
|
||||
*
|
||||
*
|
||||
* @returns {Boolean} True if the browser has support.
|
||||
*/
|
||||
hasSupport: function() {
|
||||
@@ -191,7 +191,10 @@ jsxc.notification = {
|
||||
|
||||
$(document).one('postmessagein.jsxc', function() {
|
||||
setTimeout(function() {
|
||||
jsxc.notice.add($.t('Notifications') + '?', $.t('Should_we_notify_you_'), 'gui.showRequestNotification');
|
||||
jsxc.notice.add({
|
||||
msg: $.t('Notifications') + '?',
|
||||
description: $.t('Should_we_notify_you_')
|
||||
}, 'gui.showRequestNotification');
|
||||
}, 1000);
|
||||
});
|
||||
},
|
||||
@@ -215,7 +218,7 @@ jsxc.notification = {
|
||||
|
||||
/**
|
||||
* Check permission.
|
||||
*
|
||||
*
|
||||
* @returns {Boolean} True if we have the permission
|
||||
*/
|
||||
hasPermission: function() {
|
||||
@@ -224,7 +227,7 @@ jsxc.notification = {
|
||||
|
||||
/**
|
||||
* Plays the given file.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notification
|
||||
* @param {string} soundFile File relative to the sound directory
|
||||
* @param {boolean} loop True for loop
|
||||
@@ -258,7 +261,7 @@ jsxc.notification = {
|
||||
|
||||
/**
|
||||
* Stop/remove current sound.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notification
|
||||
*/
|
||||
stopSound: function() {
|
||||
@@ -272,7 +275,7 @@ jsxc.notification = {
|
||||
|
||||
/**
|
||||
* Mute sound.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notification
|
||||
* @param {boolean} external True if triggered from external tab. Default:
|
||||
* false.
|
||||
@@ -287,7 +290,7 @@ jsxc.notification = {
|
||||
|
||||
/**
|
||||
* Unmute sound.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.notification
|
||||
* @param {boolean} external True if triggered from external tab. Default:
|
||||
* false.
|
||||
@@ -310,13 +313,13 @@ jsxc.notification = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* Set some options for the chat.
|
||||
*
|
||||
*
|
||||
* @namespace jsxc.options
|
||||
*/
|
||||
jsxc.options = {
|
||||
@@ -47,7 +47,7 @@ jsxc.options = {
|
||||
enable: true,
|
||||
ERROR_START_AKE: false,
|
||||
debug: false,
|
||||
SEND_WHITESPACE_TAG: true,
|
||||
SEND_WHITESPACE_TAG: false,
|
||||
WHITESPACE_START_AKE: true
|
||||
},
|
||||
|
||||
@@ -88,9 +88,9 @@ jsxc.options = {
|
||||
},
|
||||
|
||||
/**
|
||||
* This function is called if a login form was found, but before any
|
||||
* This function is called if a login form was found, but before any
|
||||
* modification is done to it.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.options
|
||||
* @function
|
||||
*/
|
||||
@@ -116,7 +116,7 @@ jsxc.options = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Action after login was called: dialog [String] Show wait dialog, false [boolean] |
|
||||
* Action after login was called: dialog [String] Show wait dialog, false [boolean] |
|
||||
* quiet [String] Do nothing
|
||||
*/
|
||||
onConnecting: 'dialog',
|
||||
@@ -135,25 +135,25 @@ jsxc.options = {
|
||||
|
||||
/**
|
||||
* True: Attach connection even is login form was found.
|
||||
*
|
||||
*
|
||||
* @type {Boolean}
|
||||
* @deprecated since 3.0.0. Use now loginForm.ifFound (true => attach, false => pause)
|
||||
*/
|
||||
attachIfFound: true,
|
||||
|
||||
/**
|
||||
* Describes what we should do if login form was found:
|
||||
* Describes what we should do if login form was found:
|
||||
* - Attach connection
|
||||
* - Force new connection with loginForm.jid and loginForm.passed
|
||||
* - Pause connection and do nothing
|
||||
*
|
||||
*
|
||||
* @type {(attach|force|pause)}
|
||||
*/
|
||||
ifFound: 'attach',
|
||||
|
||||
/**
|
||||
* True: Display roster minimized after first login. Afterwards the last
|
||||
* roster state will be used.
|
||||
* True: Display roster minimized after first login. Afterwards the last
|
||||
* roster state will be used.
|
||||
*/
|
||||
startMinimized: false
|
||||
},
|
||||
@@ -198,13 +198,11 @@ jsxc.options = {
|
||||
|
||||
/**
|
||||
* If no avatar is found, this function is called.
|
||||
*
|
||||
*
|
||||
* @param jid Jid of that user.
|
||||
* @this {jQuery} Elements to update with probable .jsxc_avatar elements
|
||||
*/
|
||||
defaultAvatar: function(jid) {
|
||||
jsxc.gui.avatarPlaceholder($(this).find('.jsxc_avatar'), jid);
|
||||
},
|
||||
defaultAvatar: null,
|
||||
|
||||
/**
|
||||
* This callback processes all settings.
|
||||
@@ -214,7 +212,7 @@ jsxc.options = {
|
||||
|
||||
/**
|
||||
* Returns permanent saved settings and overwrite default jsxc.options.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.options
|
||||
* @function
|
||||
* @param username {string} username
|
||||
@@ -225,7 +223,7 @@ jsxc.options = {
|
||||
|
||||
/**
|
||||
* Call this function to save user settings permanent.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.options
|
||||
* @param data Holds all data as key/value
|
||||
* @param cb Called with true on success, false otherwise
|
||||
@@ -236,19 +234,19 @@ jsxc.options = {
|
||||
|
||||
carbons: {
|
||||
/** Enable carbon copies? */
|
||||
enable: false
|
||||
enable: true
|
||||
},
|
||||
|
||||
/**
|
||||
* Processes user list.
|
||||
*
|
||||
*
|
||||
* @callback getUsers-cb
|
||||
* @param {object} list List of users, key: username, value: alias
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns a list of usernames and aliases
|
||||
*
|
||||
*
|
||||
* @function getUsers
|
||||
* @memberOf jsxc.options
|
||||
* @param {string} search Search token (start with)
|
||||
@@ -306,7 +304,40 @@ jsxc.options = {
|
||||
}
|
||||
},
|
||||
|
||||
maxStorableSize: 1000000
|
||||
/** Maximal storage size for attachments received via data channels (webrtc). */
|
||||
maxStorableSize: 1000000,
|
||||
|
||||
/** Options for file transfer. */
|
||||
fileTransfer: {
|
||||
httpUpload: {
|
||||
enable: true
|
||||
},
|
||||
// @TODO add option to enable/disable data channels
|
||||
},
|
||||
|
||||
/** Default option for chat state notifications */
|
||||
chatState: {
|
||||
enable: true
|
||||
},
|
||||
|
||||
/**
|
||||
* Download urls to screen media extensions.
|
||||
*
|
||||
* @type {Object}
|
||||
* @see example extensions {@link https://github.com/otalk/getScreenMedia}
|
||||
*/
|
||||
screenMediaExtension: {
|
||||
firefox: '',
|
||||
chrome: ''
|
||||
},
|
||||
|
||||
/**
|
||||
* Options for Message Archive Management (XEP-0313)
|
||||
*/
|
||||
mam: {
|
||||
enable: false,
|
||||
max: null
|
||||
}
|
||||
};
|
||||
</code></pre>
|
||||
</article>
|
||||
@@ -318,13 +349,13 @@ jsxc.options = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+24
-20
@@ -36,7 +36,7 @@ jsxc.otr = {
|
||||
dsaFallback: null,
|
||||
/**
|
||||
* Handler for otr receive event
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.otr
|
||||
* @param {Object} d
|
||||
* @param {string} d.bid
|
||||
@@ -63,33 +63,35 @@ jsxc.otr = {
|
||||
});
|
||||
} else {
|
||||
jsxc.gui.window.postMessage({
|
||||
_uid: d._uid,
|
||||
bid: bid,
|
||||
direction: jsxc.Message.IN,
|
||||
msg: d.msg,
|
||||
encrypted: d.encrypted,
|
||||
forwarded: d.forwarded,
|
||||
stamp: d.stamp
|
||||
stamp: d.stamp,
|
||||
attachment: d.attachment
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handler for otr send event
|
||||
*
|
||||
*
|
||||
* @param {string} jid
|
||||
* @param {string} msg message to be send
|
||||
*/
|
||||
sendMessage: function(jid, msg, uid) {
|
||||
sendMessage: function(jid, msg, message) {
|
||||
if (jsxc.otr.objects[jsxc.jidToBid(jid)].msgstate !== 0) {
|
||||
jsxc.otr.backup(jsxc.jidToBid(jid));
|
||||
}
|
||||
|
||||
jsxc.xmpp._sendMessage(jid, msg, uid);
|
||||
jsxc.xmpp._sendMessage(jid, msg, message);
|
||||
},
|
||||
|
||||
/**
|
||||
* Create new otr instance
|
||||
*
|
||||
*
|
||||
* @param {type} bid
|
||||
* @returns {undefined}
|
||||
*/
|
||||
@@ -236,21 +238,23 @@ jsxc.otr = {
|
||||
// Receive message
|
||||
jsxc.otr.objects[bid].on('ui', function(msg, encrypted, meta) {
|
||||
jsxc.otr.receiveMessage({
|
||||
_uid: meta._uid,
|
||||
bid: bid,
|
||||
msg: msg,
|
||||
encrypted: encrypted === true,
|
||||
stamp: meta.stamp,
|
||||
forwarded: meta.forwarded
|
||||
forwarded: meta.forwarded,
|
||||
attachment: meta.attachment
|
||||
});
|
||||
});
|
||||
|
||||
// Send message
|
||||
jsxc.otr.objects[bid].on('io', function(msg, uid) {
|
||||
jsxc.otr.objects[bid].on('io', function(msg, message) {
|
||||
var jid = jsxc.gui.window.get(bid).data('jid') || jsxc.otr.objects[bid].jid;
|
||||
|
||||
jsxc.otr.objects[bid].jid = jid;
|
||||
|
||||
jsxc.otr.sendMessage(jid, msg, uid);
|
||||
jsxc.otr.sendMessage(jid, msg, message);
|
||||
});
|
||||
|
||||
jsxc.otr.objects[bid].on('error', function(err) {
|
||||
@@ -271,7 +275,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* show verification dialog with related part (secret or question)
|
||||
*
|
||||
*
|
||||
* @param {type} bid
|
||||
* @param {string} [data]
|
||||
* @returns {undefined}
|
||||
@@ -303,7 +307,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* Send verification request to buddy
|
||||
*
|
||||
*
|
||||
* @param {string} bid
|
||||
* @param {string} sec secret
|
||||
* @param {string} [quest] question
|
||||
@@ -317,7 +321,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* Toggle encryption state
|
||||
*
|
||||
*
|
||||
* @param {type} bid
|
||||
* @returns {undefined}
|
||||
*/
|
||||
@@ -335,7 +339,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* Send request to encrypt the session
|
||||
*
|
||||
*
|
||||
* @param {type} bid
|
||||
* @returns {undefined}
|
||||
*/
|
||||
@@ -351,7 +355,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* Abort encryptet session
|
||||
*
|
||||
*
|
||||
* @param {type} bid
|
||||
* @param cb callback
|
||||
* @returns {undefined}
|
||||
@@ -371,7 +375,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* Backups otr session
|
||||
*
|
||||
*
|
||||
* @param {string} bid
|
||||
*/
|
||||
backup: function(bid) {
|
||||
@@ -403,7 +407,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* Restore old otr session
|
||||
*
|
||||
*
|
||||
* @param {string} bid
|
||||
*/
|
||||
restore: function(bid) {
|
||||
@@ -438,7 +442,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* Create or load DSA key
|
||||
*
|
||||
*
|
||||
* @returns {unresolved}
|
||||
*/
|
||||
createDSA: function() {
|
||||
@@ -536,7 +540,7 @@ jsxc.otr = {
|
||||
|
||||
/**
|
||||
* Ending of DSA key generation.
|
||||
*
|
||||
*
|
||||
* @param {DSA} dsa DSA object
|
||||
*/
|
||||
DSAready: function(dsa) {
|
||||
@@ -566,13 +570,13 @@ jsxc.otr = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -41,6 +41,22 @@ jsxc.storage = {
|
||||
|
||||
SEP: ':',
|
||||
|
||||
hasSupport: function() {
|
||||
if (typeof localStorage === 'undefined' || localStorage === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
localStorage.setItem('jsxc:storage:test', 'jsxc');
|
||||
localStorage.removeItem('jsxc:storage:test');
|
||||
} catch (err) {
|
||||
jsxc.warn('Can not save any data. Probably your quota exceeded or you use Safari in private Mode:', (err) ? err.message : undefined);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {type} uk Should we generate a user prefix?
|
||||
* @returns {String} prefix
|
||||
@@ -50,7 +66,7 @@ jsxc.storage = {
|
||||
var self = jsxc.storage;
|
||||
|
||||
if (uk && !jsxc.bid) {
|
||||
console.trace('Unable to create user prefix');
|
||||
jsxc.warn('Unable to create user prefix');
|
||||
}
|
||||
|
||||
return self.PREFIX + self.SEP + ((uk && jsxc.bid) ? jsxc.bid + self.SEP : '');
|
||||
@@ -90,7 +106,11 @@ jsxc.storage = {
|
||||
});
|
||||
}
|
||||
|
||||
localStorage.setItem(jsxc.storage.getPrefix(uk) + key, value);
|
||||
try {
|
||||
localStorage.setItem(jsxc.storage.getPrefix(uk) + key, value);
|
||||
} catch (err) {
|
||||
jsxc.error('An error occured while saving data.', (err) ? err.message : undefined);
|
||||
}
|
||||
},
|
||||
|
||||
setUserItem: function(type, key, value) {
|
||||
@@ -422,6 +442,11 @@ jsxc.storage = {
|
||||
var history = JSON.parse(e.newValue);
|
||||
var uid, el, message;
|
||||
|
||||
if (!jsxc.master) {
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
win.find('.jsxc_textarea').empty();
|
||||
}
|
||||
|
||||
while (history.length > 0) {
|
||||
uid = history.pop();
|
||||
|
||||
@@ -430,7 +455,7 @@ jsxc.storage = {
|
||||
|
||||
if (el.length === 0) {
|
||||
if (jsxc.master && message.direction === jsxc.Message.OUT) {
|
||||
jsxc.xmpp.sendMessage(message.bid, message.msg, message._uid);
|
||||
jsxc.xmpp.sendMessage(message);
|
||||
}
|
||||
|
||||
jsxc.gui.window._postMessage(message, true);
|
||||
@@ -654,13 +679,13 @@ jsxc.storage = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+21
-10
@@ -60,20 +60,31 @@ jsxc.tab = {
|
||||
});
|
||||
},
|
||||
|
||||
/*jshint -W098 */
|
||||
execMaster: function(cmd, params) {
|
||||
/**
|
||||
* Execute command in master tab.
|
||||
*
|
||||
* @param {String} cmd Command
|
||||
* @param {String[]} params List of parameters
|
||||
*/
|
||||
execMaster: function() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
args.unshift(jsxc.tab.CONST.MASTER);
|
||||
|
||||
jsxc.tab.exec.apply(this, args);
|
||||
},
|
||||
execSlave: function(cmd, params) {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
args.unshift(jsxc.tab.CONST.SLAVE);
|
||||
|
||||
jsxc.tab.exec.apply(this, args);
|
||||
}
|
||||
/*jshint +W098 */
|
||||
/**
|
||||
* Execute command in all slave tabs.
|
||||
*
|
||||
* @param {String} cmd Command
|
||||
* @param {String[]} params List of parameters
|
||||
*/
|
||||
execSlave: function() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
args.unshift(jsxc.tab.CONST.SLAVE);
|
||||
|
||||
jsxc.tab.exec.apply(this, args);
|
||||
}
|
||||
};
|
||||
</code></pre>
|
||||
</article>
|
||||
@@ -85,13 +96,13 @@ jsxc.tab = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+556
-202
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -35,7 +35,7 @@ jsxc.xmpp.bookmarks = {};
|
||||
|
||||
/**
|
||||
* Determines if server is able to store bookmarks.
|
||||
*
|
||||
*
|
||||
* @return {boolean} True: Server supports bookmark storage
|
||||
*/
|
||||
jsxc.xmpp.bookmarks.remote = function() {
|
||||
@@ -98,7 +98,7 @@ jsxc.xmpp.bookmarks.loadFromLocal = function() {
|
||||
|
||||
/**
|
||||
* Load bookmarks from remote storage.
|
||||
*
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
jsxc.xmpp.bookmarks.loadFromRemote = function() {
|
||||
@@ -156,7 +156,11 @@ jsxc.xmpp.bookmarks.loadFromRemote = function() {
|
||||
if (err.reasons[0] === 'item-not-found') {
|
||||
jsxc.debug('create bookmark node');
|
||||
|
||||
bookmarks.createBookmarksNode();
|
||||
bookmarks.createBookmarksNode(function() {
|
||||
jsxc.debug('Bookmark node created.');
|
||||
}, function() {
|
||||
jsxc.debug('Could not create bookmark node.');
|
||||
});
|
||||
} else {
|
||||
jsxc.debug('[XMPP] Could not create bookmark: ' + err.type, err.reasons);
|
||||
}
|
||||
@@ -377,13 +381,13 @@ jsxc.xmpp.bookmarks.showDialog = function(room) {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -0,0 +1,285 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: jsxc.lib.xmpp.chatState.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: jsxc.lib.xmpp.chatState.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* Implements XEP-0085: Chat State Notifications.
|
||||
*
|
||||
* @namespace jsxc.xmpp.chatState
|
||||
* @see {@link http://xmpp.org/extensions/xep-0085.html}
|
||||
*/
|
||||
jsxc.xmpp.chatState = {
|
||||
conn: null,
|
||||
|
||||
/** Delay between two notification on the message composing */
|
||||
toComposingNotificationDelay: 900,
|
||||
};
|
||||
|
||||
jsxc.xmpp.chatState.init = function() {
|
||||
var self = jsxc.xmpp.chatState;
|
||||
|
||||
if (!jsxc.xmpp.conn || !jsxc.xmpp.connected) {
|
||||
$(document).on('attached.jsxc', self.init);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// prevent double execution after reconnect
|
||||
$(document).off('composing.chatstates', jsxc.xmpp.chatState.onComposing);
|
||||
$(document).off('paused.chatstates', jsxc.xmpp.chatState.onPaused);
|
||||
$(document).off('active.chatstates', jsxc.xmpp.chatState.onActive);
|
||||
|
||||
if (self.isDisabled()) {
|
||||
jsxc.debug('chat state notification disabled');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
self.conn = jsxc.xmpp.conn;
|
||||
|
||||
$(document).on('composing.chatstates', jsxc.xmpp.chatState.onComposing);
|
||||
$(document).on('paused.chatstates', jsxc.xmpp.chatState.onPaused);
|
||||
$(document).on('active.chatstates', jsxc.xmpp.chatState.onActive);
|
||||
};
|
||||
|
||||
/**
|
||||
* Composing event received. Display message.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.chatState
|
||||
* @param {Event} ev
|
||||
* @param {String} jid
|
||||
*/
|
||||
jsxc.xmpp.chatState.onComposing = function(ev, jid) {
|
||||
var self = jsxc.xmpp.chatState;
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
var data = jsxc.storage.getUserItem('buddy', bid) || null;
|
||||
|
||||
if (!data || jsxc.xmpp.chatState.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore own notifications in groupchat
|
||||
if (data.type === 'groupchat' &&
|
||||
Strophe.getResourceFromJid(jid) === Strophe.getNodeFromJid(self.conn.jid)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var user = data.type === 'groupchat' ? Strophe.getResourceFromJid(jid) : data.name;
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
|
||||
if (win.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// add user in array if necessary
|
||||
var usersComposing = win.data('composing') || [];
|
||||
if (usersComposing.indexOf(user) === -1) {
|
||||
usersComposing.push(user);
|
||||
win.data('composing', usersComposing);
|
||||
}
|
||||
|
||||
var msg = self._genComposingMsg(data.type, usersComposing);
|
||||
jsxc.xmpp.chatState.setStatus(win, msg);
|
||||
};
|
||||
|
||||
/**
|
||||
* Pause event receive. Remove or update composing message.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.chatState
|
||||
* @param {Event} ev
|
||||
* @param {String} jid
|
||||
*/
|
||||
jsxc.xmpp.chatState.onPaused = function(ev, jid) {
|
||||
var self = jsxc.xmpp.chatState;
|
||||
var bid = jsxc.jidToBid(jid);
|
||||
var data = jsxc.storage.getUserItem('buddy', bid) || null;
|
||||
|
||||
if (!data || jsxc.xmpp.chatState.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var user = data.type === 'groupchat' ? Strophe.getResourceFromJid(jid) : data.name;
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
|
||||
if (win.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var usersComposing = win.data('composing') || [];
|
||||
|
||||
if (usersComposing.indexOf(user) >= 0) {
|
||||
// remove user from list
|
||||
usersComposing.splice(usersComposing.indexOf(user), 1);
|
||||
win.data('composing', usersComposing);
|
||||
}
|
||||
|
||||
var composingMsg;
|
||||
if (usersComposing.length !== 0) {
|
||||
composingMsg = self._genComposingMsg(data.type, usersComposing);
|
||||
}
|
||||
|
||||
jsxc.xmpp.chatState.setStatus(win, composingMsg);
|
||||
};
|
||||
|
||||
/**
|
||||
* Active event received.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.chatState
|
||||
* @param {Event} ev
|
||||
* @param {String} jid
|
||||
*/
|
||||
jsxc.xmpp.chatState.onActive = function(ev, jid) {
|
||||
jsxc.xmpp.chatState.onPaused(ev, jid);
|
||||
};
|
||||
|
||||
/**
|
||||
* Send composing event.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.chatState
|
||||
* @param {String} bid
|
||||
*/
|
||||
jsxc.xmpp.chatState.startComposing = function(bid) {
|
||||
var self = jsxc.xmpp.chatState;
|
||||
|
||||
if (!jsxc.xmpp.conn || !jsxc.xmpp.conn.chatstates || jsxc.xmpp.chatState.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
var timeout = win.data('composing-timeout');
|
||||
var type = win.hasClass('jsxc_groupchat') ? 'groupchat' : 'chat';
|
||||
|
||||
if (timeout) {
|
||||
// @REVIEW page reload?
|
||||
clearTimeout(timeout);
|
||||
} else {
|
||||
jsxc.xmpp.conn.chatstates.sendComposing(bid, type);
|
||||
}
|
||||
|
||||
timeout = setTimeout(function() {
|
||||
self.pauseComposing(bid, type);
|
||||
|
||||
win.data('composing-timeout', null);
|
||||
}, self.toComposingNotificationDelay);
|
||||
|
||||
win.data('composing-timeout', timeout);
|
||||
};
|
||||
|
||||
/**
|
||||
* Send pause event.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.chatState
|
||||
* @param {String} bid
|
||||
*/
|
||||
jsxc.xmpp.chatState.pauseComposing = function(bid, type) {
|
||||
if (jsxc.xmpp.chatState.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
jsxc.xmpp.conn.chatstates.sendPaused(bid, type);
|
||||
};
|
||||
|
||||
/**
|
||||
* End composing without sending a pause event.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.chatState
|
||||
* @param {String} bid
|
||||
*/
|
||||
jsxc.xmpp.chatState.endComposing = function(bid) {
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
|
||||
if (win.data('composing-timeout')) {
|
||||
clearTimeout(win.data('composing-timeout'));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Generate composing message.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.chatState
|
||||
* @param {String} the type of the chat ('groupchat' or 'chat')
|
||||
* @param {Array} usersComposing List of users which are currently composing a message
|
||||
*/
|
||||
jsxc.xmpp.chatState._genComposingMsg = function(chatType, usersComposing) {
|
||||
if (!usersComposing || usersComposing.length === 0) {
|
||||
jsxc.debug('usersComposing array is empty?');
|
||||
|
||||
return '';
|
||||
} else {
|
||||
if (chatType === 'groupchat') {
|
||||
return usersComposing.length > 1 ? usersComposing.join(', ') + $.t('_are_composing') :
|
||||
usersComposing[0] + $.t('_is_composing');
|
||||
}
|
||||
return $.t('_is_composing');
|
||||
}
|
||||
};
|
||||
|
||||
jsxc.xmpp.chatState.setStatus = function(win, msg) {
|
||||
var statusMsgElement = win.find('.jsxc_status-msg');
|
||||
|
||||
statusMsgElement.text(msg || '');
|
||||
statusMsgElement.attr('title', msg || '');
|
||||
|
||||
if (msg) {
|
||||
statusMsgElement.addClass('jsxc_composing');
|
||||
win.addClass('jsxc_status-msg-show');
|
||||
} else {
|
||||
statusMsgElement.removeClass('jsxc_composing');
|
||||
win.removeClass('jsxc_status-msg-show');
|
||||
}
|
||||
};
|
||||
|
||||
jsxc.xmpp.chatState.isDisabled = function() {
|
||||
var options = jsxc.options.get('chatState') || {};
|
||||
|
||||
return !options.enable;
|
||||
};
|
||||
|
||||
$(document).on('attached.jsxc', jsxc.xmpp.chatState.init);
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,385 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: jsxc.lib.xmpp.httpUpload.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: jsxc.lib.xmpp.httpUpload.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* Implements Http File Upload (XEP-0363)
|
||||
*
|
||||
* @namespace jsxc.xmpp.httpUpload
|
||||
* @see {@link http://xmpp.org/extensions/xep-0363.html}
|
||||
*/
|
||||
jsxc.xmpp.httpUpload = {
|
||||
conn: null,
|
||||
|
||||
ready: false,
|
||||
|
||||
CONST: {
|
||||
NS: {
|
||||
HTTPUPLOAD: 'urn:xmpp:http:upload'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Set up http file upload.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.httpUpload
|
||||
* @param {Object} o options
|
||||
*/
|
||||
jsxc.xmpp.httpUpload.init = function(o) {
|
||||
var self = jsxc.xmpp.httpUpload;
|
||||
self.conn = jsxc.xmpp.conn;
|
||||
|
||||
var fileTransferOptions = jsxc.options.get('fileTransfer') || {};
|
||||
var options = o || jsxc.options.get('httpUpload');
|
||||
|
||||
if (!fileTransferOptions.httpUpload.enable) {
|
||||
jsxc.debug('http upload disabled');
|
||||
|
||||
jsxc.options.set('httpUpload', false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (options && options.server) {
|
||||
self.ready = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var caps = jsxc.xmpp.conn.caps;
|
||||
var domain = jsxc.xmpp.conn.domain;
|
||||
|
||||
if (!caps || !domain || typeof caps._knownCapabilities[caps._jidVerIndex[domain]] === 'undefined') {
|
||||
jsxc.debug('Waiting for server capabilities');
|
||||
|
||||
$(document).on('caps.strophe', function onCaps(ev, from) {
|
||||
|
||||
if (from !== domain) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.init();
|
||||
|
||||
$(document).off('caps.strophe', onCaps);
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
self.discoverUploadService();
|
||||
};
|
||||
|
||||
/**
|
||||
* Discover upload service for http upload.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.httpUpload
|
||||
*/
|
||||
jsxc.xmpp.httpUpload.discoverUploadService = function() {
|
||||
var self = jsxc.xmpp.httpUpload;
|
||||
var domain = self.conn.domain;
|
||||
|
||||
jsxc.debug('discover http upload service');
|
||||
|
||||
if (jsxc.xmpp.conn.caps.hasFeatureByJid(domain, self.CONST.NS.HTTPUPLOAD)) {
|
||||
self.queryItemForUploadService(domain);
|
||||
}
|
||||
|
||||
self.conn.disco.items(domain, null, function(items) {
|
||||
$(items).find('item').each(function() {
|
||||
var jid = $(this).attr('jid');
|
||||
|
||||
if (self.ready) {
|
||||
// abort, because we already found a service
|
||||
return false;
|
||||
}
|
||||
|
||||
self.queryItemForUploadService(jid);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Query item for upload service.
|
||||
*
|
||||
* @param {String} jid
|
||||
* @param {Function} cb Callback on success
|
||||
* @memberOf jsxc.xmpp.httpUpload
|
||||
*/
|
||||
jsxc.xmpp.httpUpload.queryItemForUploadService = function(jid, cb) {
|
||||
var self = jsxc.xmpp.httpUpload;
|
||||
|
||||
jsxc.debug('query ' + jid + ' for upload service');
|
||||
|
||||
self.conn.disco.info(jid, null, function(info) {
|
||||
var httpUploadFeature = $(info).find('feature[var="' + self.CONST.NS.HTTPUPLOAD + '"]');
|
||||
var httpUploadMaxSize = $(info).find('field[var="max-file-size"]');
|
||||
|
||||
if (httpUploadFeature.length > 0) {
|
||||
jsxc.debug('http upload service found on ' + jid);
|
||||
|
||||
jsxc.options.set('httpUpload', {
|
||||
server: jid,
|
||||
name: $(info).find('identity').attr('name'),
|
||||
maxSize: parseInt(httpUploadMaxSize.text()) || -1
|
||||
});
|
||||
|
||||
self.ready = true;
|
||||
|
||||
if (typeof cb === 'function') {
|
||||
cb.call(info);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Upload file and send link to peer.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.httpUpload
|
||||
* @param {File} file
|
||||
* @param {Message} message Preview message
|
||||
*/
|
||||
jsxc.xmpp.httpUpload.sendFile = function(file, message) {
|
||||
jsxc.debug('Send file via http upload');
|
||||
|
||||
var self = jsxc.xmpp.httpUpload;
|
||||
|
||||
// even if the link is encrypted the file isn't
|
||||
message.encrypted = false;
|
||||
|
||||
self.requestSlot(file, function(data) {
|
||||
if (!data) {
|
||||
// general error
|
||||
jsxc.warn('Unknown error occured. Please check the debug log.');
|
||||
} else if (data.error) {
|
||||
// specific error
|
||||
jsxc.warn('The xmpp server responded with an error of the type "' + data.error.type + '"');
|
||||
|
||||
message.getDOM().remove();
|
||||
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: message.bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: data.error.text
|
||||
});
|
||||
|
||||
message.delete();
|
||||
} else if (data.get && data.put) {
|
||||
jsxc.debug('slot received, start upload to ' + data.put);
|
||||
|
||||
self.uploadFile(data.put, file, message, function() {
|
||||
var attachment = message.attachment;
|
||||
var metaString = attachment.type + '|' + attachment.size + '|' + attachment.name;
|
||||
var a = $('<a>');
|
||||
a.attr('href', data.get);
|
||||
|
||||
attachment.data = data.get;
|
||||
|
||||
if (attachment.thumbnail) {
|
||||
var img = $('<img>');
|
||||
img.attr('alt', 'Preview:' + metaString);
|
||||
img.attr('src', attachment.thumbnail);
|
||||
a.prepend(img);
|
||||
} else {
|
||||
a.text(metaString);
|
||||
}
|
||||
|
||||
message.msg = data.get;
|
||||
message.htmlMsg = $('<span>').append(a).html();
|
||||
message.type = jsxc.Message.HTML;
|
||||
jsxc.gui.window.postMessage(message);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Upload the given file to the given url.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.httpUpload
|
||||
* @param {String} url upload url
|
||||
* @param {File} file
|
||||
* @param {Message} message preview message
|
||||
* @param {Function} success_cb callback on successful transition
|
||||
*/
|
||||
jsxc.xmpp.httpUpload.uploadFile = function(url, file, message, success_cb) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'PUT',
|
||||
contentType: 'application/octet-stream',
|
||||
data: file,
|
||||
processData: false,
|
||||
xhr: function() {
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
|
||||
// track upload progress
|
||||
xhr.upload.onprogress = function(ev) {
|
||||
if (ev.lengthComputable) {
|
||||
jsxc.gui.window.updateProgress(message, ev.loaded, ev.total);
|
||||
}
|
||||
};
|
||||
return xhr;
|
||||
},
|
||||
success: function() {
|
||||
jsxc.debug('file successful uploaded');
|
||||
|
||||
// In case that upload progress is not available, inform user
|
||||
jsxc.gui.window.updateProgress(message, 1, 1);
|
||||
|
||||
if (success_cb) {
|
||||
success_cb();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
jsxc.warn('error while uploading file to ' + url);
|
||||
|
||||
message.error = 'Could not upload file';
|
||||
jsxc.gui.window.postMessage(message);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Request upload slot.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.httpUpload
|
||||
* @param {File} file
|
||||
* @param {Function} cb Callback after finished request
|
||||
*/
|
||||
jsxc.xmpp.httpUpload.requestSlot = function(file, cb) {
|
||||
var self = jsxc.xmpp.httpUpload;
|
||||
var options = jsxc.options.get('httpUpload');
|
||||
|
||||
if (!options || !options.server) {
|
||||
jsxc.warn('could not request upload slot, because I am not aware of a server or http upload is disabled');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var iq = $iq({
|
||||
to: options.server,
|
||||
type: 'get'
|
||||
}).c('request', {
|
||||
xmlns: self.CONST.NS.HTTPUPLOAD
|
||||
}).c('filename').t(file.name)
|
||||
.up()
|
||||
.c('size').t(file.size);
|
||||
|
||||
self.conn.sendIQ(iq, function(stanza) {
|
||||
self.successfulRequestSlotCB(stanza, cb);
|
||||
}, function(stanza) {
|
||||
self.failedRequestSlotCB(stanza, cb);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Process successful response to slot request.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.httpUpload
|
||||
* @param {String} stanza
|
||||
* @param {Function} cb
|
||||
*/
|
||||
jsxc.xmpp.httpUpload.successfulRequestSlotCB = function(stanza, cb) {
|
||||
var self = jsxc.xmpp.httpUpload;
|
||||
var slot = $(stanza).find('slot[xmlns="' + self.CONST.NS.HTTPUPLOAD + '"]');
|
||||
|
||||
if (slot.length > 0) {
|
||||
var put = slot.find('put').text();
|
||||
var get = slot.find('get').text();
|
||||
|
||||
cb({
|
||||
put: put,
|
||||
get: get
|
||||
});
|
||||
} else {
|
||||
self.failedRequestSlotCB(stanza, cb);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Process failed response to slot request.
|
||||
*
|
||||
* @memberOf jsxc.xmpp.httpUpload
|
||||
* @param {String} stanza
|
||||
* @param {Function} cb
|
||||
*/
|
||||
jsxc.xmpp.httpUpload.failedRequestSlotCB = function(stanza, cb) {
|
||||
if ($(stanza).find('error').length <= 0) {
|
||||
jsxc.warn('response does not contain a slot element');
|
||||
|
||||
cb();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var error = {
|
||||
type: $(stanza).find('error').attr('type') || 'unknown',
|
||||
text: $(stanza).find('error text').text()
|
||||
};
|
||||
|
||||
if ($(stanza).find('error not-acceptable')) {
|
||||
error.reason = 'not-acceptable';
|
||||
} else if ($(stanza).find('error resource-constraint')) {
|
||||
error.reason = 'resource-constraint';
|
||||
} else if ($(stanza).find('error not-allowed')) {
|
||||
error.reason = 'not-allowed';
|
||||
}
|
||||
|
||||
cb({
|
||||
error: error
|
||||
});
|
||||
};
|
||||
|
||||
$(document).on('stateUIChange.jsxc', function(ev, state) {
|
||||
if (state === jsxc.CONST.UISTATE.INITIATING) {
|
||||
jsxc.xmpp.httpUpload.init();
|
||||
}
|
||||
});
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
+366
-78
@@ -28,7 +28,7 @@
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* Handle XMPP stuff.
|
||||
*
|
||||
*
|
||||
* @namespace jsxc.xmpp
|
||||
*/
|
||||
jsxc.xmpp = {
|
||||
@@ -36,14 +36,14 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Create new connection or attach to old
|
||||
*
|
||||
*
|
||||
* @name login
|
||||
* @memberOf jsxc.xmpp
|
||||
* @private
|
||||
*/
|
||||
/**
|
||||
* Create new connection with given parameters.
|
||||
*
|
||||
*
|
||||
* @name login^2
|
||||
* @param {string} jid
|
||||
* @param {string} password
|
||||
@@ -52,7 +52,7 @@ jsxc.xmpp = {
|
||||
*/
|
||||
/**
|
||||
* Attach connection with given parameters.
|
||||
*
|
||||
*
|
||||
* @name login^3
|
||||
* @param {string} jid
|
||||
* @param {string} sid
|
||||
@@ -122,6 +122,7 @@ jsxc.xmpp = {
|
||||
$(document).on('authfail.jsxc', jsxc.xmpp.onAuthFail);
|
||||
|
||||
Strophe.addNamespace('RECEIPTS', 'urn:xmpp:receipts');
|
||||
Strophe.addNamespace('VERSION', 'jabber:iq:version');
|
||||
}
|
||||
|
||||
// Create new connection (no login)
|
||||
@@ -169,12 +170,12 @@ jsxc.xmpp = {
|
||||
jsxc.xmpp.conn.caps.node = 'http://jsxc.org/';
|
||||
}
|
||||
|
||||
jsxc.changeState(jsxc.CONST.STATE.ESTABLISHING);
|
||||
|
||||
if (sid && rid) {
|
||||
jsxc.debug('Try to attach');
|
||||
jsxc.debug('SID: ' + sid);
|
||||
|
||||
jsxc.reconnect = true;
|
||||
|
||||
jsxc.xmpp.conn.attach(jid, sid, rid, callback);
|
||||
} else {
|
||||
jsxc.debug('New connection');
|
||||
@@ -182,6 +183,7 @@ jsxc.xmpp = {
|
||||
if (jsxc.xmpp.conn.caps) {
|
||||
// Add system handler, because user handler isn't called before
|
||||
// we are authenticated
|
||||
// @REVIEW this could maybe retrieved from jsxc.xmpp.conn.features
|
||||
jsxc.xmpp.conn._addSysHandler(function(stanza) {
|
||||
var from = jsxc.xmpp.conn.domain,
|
||||
c = stanza.querySelector('c'),
|
||||
@@ -204,7 +206,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Logs user out of his xmpp session and does some clean up.
|
||||
*
|
||||
*
|
||||
* @param {boolean} complete If set to false, roster will not be removed
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
@@ -222,10 +224,13 @@ jsxc.xmpp = {
|
||||
|
||||
// REVIEW: this should maybe moved to xmpp.disconnected
|
||||
// clean up
|
||||
jsxc.storage.removeUserItem('buddylist');
|
||||
jsxc.storage.removeUserItem('windowlist');
|
||||
jsxc.storage.removeUserItem('unreadMsg');
|
||||
|
||||
if (jsxc.gui.favicon) {
|
||||
jsxc.gui.favicon.badge(0);
|
||||
}
|
||||
|
||||
// Hide dropdown menu
|
||||
$('body').click();
|
||||
|
||||
@@ -271,7 +276,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Triggered if connection is established
|
||||
*
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
connected: function() {
|
||||
@@ -282,6 +287,9 @@ jsxc.xmpp = {
|
||||
|
||||
jsxc.xmpp.saveSessionParameter();
|
||||
|
||||
var rosterVerSupport = $(jsxc.xmpp.conn.features).find('[xmlns="urn:xmpp:features:rosterver"]').length > 0;
|
||||
jsxc.storage.setUserItem('rosterVerSupport', rosterVerSupport);
|
||||
|
||||
if (jsxc.options.loginForm.triggered) {
|
||||
switch (jsxc.options.loginForm.onConnected || 'submit') {
|
||||
case 'submit':
|
||||
@@ -299,22 +307,28 @@ jsxc.xmpp = {
|
||||
jsxc.xmpp.conn.resume();
|
||||
jsxc.onMaster();
|
||||
|
||||
jsxc.changeState(jsxc.CONST.STATE.READY);
|
||||
$(document).trigger('attached.jsxc');
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggered if connection is attached
|
||||
*
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
attached: function() {
|
||||
|
||||
$('#jsxc_roster').removeClass('jsxc_noConnection');
|
||||
|
||||
Strophe.addNamespace('VERSION', 'jabber:iq:version');
|
||||
|
||||
jsxc.xmpp.conn.addHandler(jsxc.xmpp.onRosterChanged, 'jabber:iq:roster', 'iq', 'set');
|
||||
jsxc.xmpp.conn.addHandler(jsxc.xmpp.onMessage, null, 'message', 'chat');
|
||||
jsxc.xmpp.conn.addHandler(jsxc.xmpp.onChatMessage, null, 'message', 'chat');
|
||||
jsxc.xmpp.conn.addHandler(jsxc.xmpp.onErrorMessage, null, 'message', 'error');
|
||||
jsxc.xmpp.conn.addHandler(jsxc.xmpp.onHeadlineMessage, null, 'message', 'headline');
|
||||
jsxc.xmpp.conn.addHandler(jsxc.xmpp.onReceived, null, 'message');
|
||||
jsxc.xmpp.conn.addHandler(jsxc.xmpp.onPresence, null, 'presence');
|
||||
jsxc.xmpp.conn.addHandler(jsxc.xmpp.onVersionRequest, Strophe.NS.VERSION, 'iq', 'get');
|
||||
|
||||
jsxc.gui.init();
|
||||
|
||||
@@ -355,36 +369,43 @@ jsxc.xmpp = {
|
||||
}
|
||||
}
|
||||
|
||||
var rosterLoaded = jsxc.storage.getUserItem('rosterLoaded');
|
||||
|
||||
// Only load roaster if necessary
|
||||
if (!jsxc.reconnect || !jsxc.storage.getUserItem('buddylist')) {
|
||||
if (rosterLoaded !== jsxc.xmpp.conn._proto.sid) {
|
||||
// in order to not overide existing presence information, we send
|
||||
// pres first after roster is ready
|
||||
$(document).one('cloaded.roster.jsxc', jsxc.xmpp.sendPres);
|
||||
|
||||
$('#jsxc_roster > p:first').remove();
|
||||
|
||||
var queryAttr = {
|
||||
xmlns: 'jabber:iq:roster'
|
||||
};
|
||||
|
||||
if (jsxc.storage.getUserItem('rosterVerSupport')) {
|
||||
// @TODO check if we really cached the roster
|
||||
queryAttr.ver = jsxc.storage.getUserItem('rosterVer') || '';
|
||||
}
|
||||
|
||||
var iq = $iq({
|
||||
type: 'get'
|
||||
}).c('query', {
|
||||
xmlns: 'jabber:iq:roster'
|
||||
});
|
||||
}).c('query', queryAttr);
|
||||
|
||||
jsxc.xmpp.conn.sendIQ(iq, jsxc.xmpp.onRoster);
|
||||
} else {
|
||||
jsxc.xmpp.sendPres();
|
||||
|
||||
if (!jsxc.restoreCompleted) {
|
||||
jsxc.restoreRoster();
|
||||
jsxc.restoreWindows();
|
||||
jsxc.restoreCompleted = true;
|
||||
|
||||
$(document).trigger('restoreCompleted.jsxc');
|
||||
jsxc.gui.restore();
|
||||
}
|
||||
}
|
||||
|
||||
jsxc.xmpp.saveSessionParameter();
|
||||
|
||||
jsxc.masterActions();
|
||||
|
||||
jsxc.changeState(jsxc.CONST.STATE.READY);
|
||||
},
|
||||
|
||||
saveSessionParameter: function() {
|
||||
@@ -397,14 +418,12 @@ jsxc.xmpp = {
|
||||
},
|
||||
|
||||
initNewConnection: function() {
|
||||
// make shure roster will be reloaded
|
||||
jsxc.storage.removeUserItem('buddylist');
|
||||
|
||||
jsxc.storage.removeUserItem('windowlist');
|
||||
jsxc.storage.removeUserItem('own');
|
||||
jsxc.storage.removeUserItem('avatar', 'own');
|
||||
jsxc.storage.removeUserItem('otrlist');
|
||||
jsxc.storage.removeUserItem('unreadMsg');
|
||||
jsxc.storage.removeUserItem('features');
|
||||
|
||||
// reset user options
|
||||
jsxc.storage.removeUserElement('options', 'RTCPeerConfig');
|
||||
@@ -419,6 +438,7 @@ jsxc.xmpp = {
|
||||
jsxc.xmpp.conn.disco.addIdentity('client', 'web', 'JSXC');
|
||||
jsxc.xmpp.conn.disco.addFeature(Strophe.NS.DISCO_INFO);
|
||||
jsxc.xmpp.conn.disco.addFeature(Strophe.NS.RECEIPTS);
|
||||
jsxc.xmpp.conn.disco.addFeature(Strophe.NS.VERSION);
|
||||
}
|
||||
|
||||
// create presence stanza
|
||||
@@ -441,11 +461,28 @@ jsxc.xmpp = {
|
||||
|
||||
jsxc.debug('Send presence', pres.toString());
|
||||
jsxc.xmpp.conn.send(pres);
|
||||
|
||||
if (!jsxc.storage.getUserItem('features')) {
|
||||
jsxc.xmpp.conn.flush();
|
||||
|
||||
var barJid = Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid);
|
||||
|
||||
jsxc.xmpp.conn.disco.info(barJid, undefined, function(stanza) {
|
||||
var features = $(stanza).find('feature').map(function() {
|
||||
return $(this).attr('var');
|
||||
});
|
||||
|
||||
jsxc.storage.setUserItem('features', features.toArray());
|
||||
$(document).trigger('features.jsxc');
|
||||
});
|
||||
} else {
|
||||
$(document).trigger('features.jsxc');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggered if lost connection
|
||||
*
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
disconnected: function() {
|
||||
@@ -457,6 +494,7 @@ jsxc.xmpp = {
|
||||
jsxc.storage.removeItem('hidden');
|
||||
jsxc.storage.removeUserItem('avatar', 'own');
|
||||
jsxc.storage.removeUserItem('otrlist');
|
||||
jsxc.storage.removeUserItem('features');
|
||||
|
||||
$(document).off('connected.jsxc', jsxc.xmpp.connected);
|
||||
$(document).off('attached.jsxc', jsxc.xmpp.attached);
|
||||
@@ -470,6 +508,7 @@ jsxc.xmpp = {
|
||||
|
||||
if (jsxc.triggeredFromElement) {
|
||||
$(document).trigger('toggle.roster.jsxc', ['hidden', 0]);
|
||||
jsxc.gui.roster.ready = false;
|
||||
$('#jsxc_roster').remove();
|
||||
|
||||
// REVIEW: logoutElement without href attribute?
|
||||
@@ -484,11 +523,13 @@ jsxc.xmpp = {
|
||||
jsxc.role_allocation = false;
|
||||
jsxc.master = false;
|
||||
jsxc.storage.removeItem('alive');
|
||||
|
||||
jsxc.changeState(jsxc.CONST.STATE.SUSPEND);
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggered on connection fault
|
||||
*
|
||||
*
|
||||
* @param {String} condition information why we lost the connection
|
||||
* @private
|
||||
*/
|
||||
@@ -502,7 +543,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Triggered on auth fail.
|
||||
*
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
onAuthFail: function() {
|
||||
@@ -524,18 +565,22 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Triggered on initial roster load
|
||||
*
|
||||
*
|
||||
* @param {dom} iq
|
||||
* @private
|
||||
*/
|
||||
onRoster: function(iq) {
|
||||
/*
|
||||
* <iq from='' type='get' id=''> <query xmlns='jabber:iq:roster'> <item
|
||||
* jid='' name='' subscription='' /> ... </query> </iq>
|
||||
*/
|
||||
|
||||
jsxc.debug('Load roster', iq);
|
||||
|
||||
jsxc.storage.setUserItem('rosterLoaded', jsxc.xmpp.conn._proto.sid);
|
||||
|
||||
if ($(iq).find('query').length === 0) {
|
||||
jsxc.debug('Use cached roster');
|
||||
|
||||
jsxc.restoreRoster();
|
||||
return;
|
||||
}
|
||||
|
||||
var buddies = [];
|
||||
|
||||
$(iq).find('item').each(function() {
|
||||
@@ -566,29 +611,39 @@ jsxc.xmpp = {
|
||||
|
||||
jsxc.storage.setUserItem('buddylist', buddies);
|
||||
|
||||
if ($(iq).find('query').attr('ver')) {
|
||||
jsxc.storage.setUserItem('rosterVer', $(iq).find('query').attr('ver'));
|
||||
}
|
||||
|
||||
// load bookmarks
|
||||
jsxc.xmpp.bookmarks.load();
|
||||
|
||||
jsxc.gui.roster.loaded = true;
|
||||
jsxc.debug('Roster loaded');
|
||||
$(document).trigger('cloaded.roster.jsxc');
|
||||
jsxc.changeUIState(jsxc.CONST.UISTATE.READY);
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggerd on roster changes
|
||||
*
|
||||
*
|
||||
* @param {dom} iq
|
||||
* @returns {Boolean} True to preserve handler
|
||||
* @private
|
||||
*/
|
||||
onRosterChanged: function(iq) {
|
||||
/*
|
||||
* <iq from='' type='set' id=''> <query xmlns='jabber:iq:roster'> <item
|
||||
* jid='' name='' subscription='' /> </query> </iq>
|
||||
*/
|
||||
|
||||
var iqSender = $(iq).attr('from');
|
||||
var ownBareJid = Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid);
|
||||
|
||||
if (iqSender && iqSender !== ownBareJid) {
|
||||
return true;
|
||||
}
|
||||
|
||||
jsxc.debug('onRosterChanged', iq);
|
||||
|
||||
// @REVIEW there should be only one item, according to RFC6121
|
||||
// https://xmpp.org/rfcs/rfc6121.html#roster-syntax-actions-push
|
||||
$(iq).find('item').each(function() {
|
||||
var jid = $(this).attr('jid');
|
||||
var name = $(this).attr('name') || jid;
|
||||
@@ -639,6 +694,10 @@ jsxc.xmpp = {
|
||||
}
|
||||
});
|
||||
|
||||
if ($(iq).find('query').attr('ver')) {
|
||||
jsxc.storage.setUserItem('rosterVer', $(iq).find('query').attr('ver'));
|
||||
}
|
||||
|
||||
if (!jsxc.storage.getUserItem('buddylist') || jsxc.storage.getUserItem('buddylist').length === 0) {
|
||||
jsxc.gui.roster.empty();
|
||||
} else {
|
||||
@@ -651,19 +710,19 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Triggered on incoming presence stanzas
|
||||
*
|
||||
*
|
||||
* @param {dom} presence
|
||||
* @private
|
||||
*/
|
||||
onPresence: function(presence) {
|
||||
/*
|
||||
* <presence xmlns='jabber:client' type='unavailable' from='' to=''/>
|
||||
*
|
||||
*
|
||||
* <presence xmlns='jabber:client' from='' to=''> <priority>5</priority>
|
||||
* <c xmlns='http://jabber.org/protocol/caps'
|
||||
* node='http://psi-im.org/caps' ver='caps-b75d8d2b25' ext='ca cs
|
||||
* ep-notify-2 html'/> </presence>
|
||||
*
|
||||
*
|
||||
* <presence xmlns='jabber:client' from='' to=''> <show>chat</show>
|
||||
* <status></status> <priority>5</priority> <c
|
||||
* xmlns='http://jabber.org/protocol/caps' node='http://psi-im.org/caps'
|
||||
@@ -714,7 +773,11 @@ jsxc.xmpp = {
|
||||
jid: jid,
|
||||
approve: -1
|
||||
});
|
||||
jsxc.notice.add($.t('Friendship_request'), $.t('from') + ' ' + jid, 'gui.showApproveDialog', [jid]);
|
||||
jsxc.notice.add({
|
||||
msg: $.t('Friendship_request'),
|
||||
description: $.t('from') + ' ' + jid,
|
||||
type: 'contact'
|
||||
}, 'gui.showApproveDialog', [jid]);
|
||||
|
||||
return true;
|
||||
} else if (ptype === 'unavailable' || ptype === 'unsubscribed') {
|
||||
@@ -730,7 +793,7 @@ jsxc.xmpp = {
|
||||
|
||||
if (status === 0) {
|
||||
delete res[r];
|
||||
} else {
|
||||
} else if (r) {
|
||||
res[r] = status;
|
||||
}
|
||||
|
||||
@@ -758,9 +821,7 @@ jsxc.xmpp = {
|
||||
});
|
||||
}
|
||||
|
||||
if (data.type === 'groupchat') {
|
||||
data.status = status;
|
||||
} else {
|
||||
if (data.type !== 'groupchat') {
|
||||
data.status = max;
|
||||
}
|
||||
|
||||
@@ -785,7 +846,7 @@ jsxc.xmpp = {
|
||||
jsxc.storage.setUserItem('buddy', bid, data);
|
||||
jsxc.storage.setUserItem('res', bid, res);
|
||||
|
||||
jsxc.debug('Presence (' + from + '): ' + status);
|
||||
jsxc.debug('Presence (' + from + '): ' + jsxc.CONST.STATUS[status]);
|
||||
|
||||
jsxc.gui.update(bid);
|
||||
jsxc.gui.roster.reorder(bid);
|
||||
@@ -798,15 +859,15 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Triggered on incoming message stanzas
|
||||
*
|
||||
*
|
||||
* @param {dom} presence
|
||||
* @returns {Boolean}
|
||||
* @private
|
||||
*/
|
||||
onMessage: function(stanza) {
|
||||
|
||||
onChatMessage: function(stanza) {
|
||||
var forwarded = $(stanza).find('forwarded[xmlns="' + jsxc.CONST.NS.FORWARD + '"]');
|
||||
var message, carbon;
|
||||
var originalSender = $(stanza).attr('from');
|
||||
|
||||
if (forwarded.length > 0) {
|
||||
message = forwarded.find('> message');
|
||||
@@ -815,6 +876,9 @@ jsxc.xmpp = {
|
||||
|
||||
if (carbon.length === 0) {
|
||||
carbon = false;
|
||||
} else if (originalSender !== Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid)) {
|
||||
// ignore this carbon copy
|
||||
return true;
|
||||
}
|
||||
|
||||
jsxc.debug('Incoming forwarded message', message);
|
||||
@@ -827,6 +891,7 @@ jsxc.xmpp = {
|
||||
}
|
||||
|
||||
var body = $(message).find('body:first').text();
|
||||
var htmlBody = $(message).find('body[xmlns="' + Strophe.NS.XHTML + '"]');
|
||||
|
||||
if (!body || (body.match(/\?OTR/i) && forwarded)) {
|
||||
return true;
|
||||
@@ -876,13 +941,24 @@ jsxc.xmpp = {
|
||||
var chat = jsxc.storage.getUserItem('chat', bid) || [];
|
||||
|
||||
if (chat.length === 0) {
|
||||
jsxc.notice.add($.t('Unknown_sender'), $.t('You_received_a_message_from_an_unknown_sender') + ' (' + bid + ').', 'gui.showUnknownSender', [bid]);
|
||||
jsxc.notice.add({
|
||||
msg: $.t('Unknown_sender'),
|
||||
description: $.t('You_received_a_message_from_an_unknown_sender_') + ' (' + bid + ').'
|
||||
}, 'gui.showUnknownSender', [bid]);
|
||||
}
|
||||
|
||||
var msg = jsxc.removeHTML(body);
|
||||
msg = jsxc.escapeHTML(msg);
|
||||
|
||||
jsxc.storage.saveMessage(bid, 'in', msg, false, forwarded, stamp);
|
||||
var messageObj = new jsxc.Message({
|
||||
bid: bid,
|
||||
msg: msg,
|
||||
direction: jsxc.Message.IN,
|
||||
encrypted: false,
|
||||
forwarded: forwarded,
|
||||
stamp: stamp
|
||||
});
|
||||
messageObj.save();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -914,19 +990,91 @@ jsxc.xmpp = {
|
||||
}));
|
||||
}
|
||||
|
||||
if (jsxc.otr.objects.hasOwnProperty(bid)) {
|
||||
var attachment;
|
||||
if (htmlBody.length === 1) {
|
||||
var httpUploadElement = htmlBody.find('a[data-type][data-name][data-size]');
|
||||
|
||||
if (httpUploadElement.length === 1) {
|
||||
// deprecated syntax @since 3.2.1
|
||||
attachment = {
|
||||
type: httpUploadElement.attr('data-type'),
|
||||
name: httpUploadElement.attr('data-name'),
|
||||
size: httpUploadElement.attr('data-size'),
|
||||
};
|
||||
|
||||
if (httpUploadElement.attr('data-thumbnail') && httpUploadElement.attr('data-thumbnail').match(/^\s*data:[a-z]+\/[a-z0-9-+.*]+;base64,[a-z0-9=+/]+$/i)) {
|
||||
attachment.thumbnail = httpUploadElement.attr('data-thumbnail');
|
||||
}
|
||||
|
||||
if (httpUploadElement.attr('href') && httpUploadElement.attr('href').match(/^https:\/\//)) {
|
||||
attachment.data = httpUploadElement.attr('href');
|
||||
body = null;
|
||||
}
|
||||
|
||||
if (!attachment.type.match(/^[a-z]+\/[a-z0-9-+.*]+$/i) || !attachment.name.match(/^[\s\w.,-]+$/i) || !attachment.size.match(/^\d+$/i)) {
|
||||
attachment = undefined;
|
||||
|
||||
jsxc.warn('Invalid file type, name or size.');
|
||||
}
|
||||
} else if (htmlBody.find('>a').length === 1) {
|
||||
var linkElement = htmlBody.find('>a');
|
||||
var metaString = '';
|
||||
var thumbnail;
|
||||
|
||||
if (linkElement.find('>img').length === 1) {
|
||||
var imgElement = linkElement.find('>img');
|
||||
var src = imgElement.attr('src') || '';
|
||||
var altString = imgElement.attr('alt') || '';
|
||||
metaString = altString.replace(/^Preview:/, '');
|
||||
|
||||
if (src.match(/^\s*data:[a-z]+\/[a-z0-9-+.*]+;base64,[a-z0-9=+/]+$/i)) {
|
||||
thumbnail = src;
|
||||
}
|
||||
} else {
|
||||
metaString = linkElement.text();
|
||||
}
|
||||
|
||||
var metaMatch = metaString.match(/^([a-z]+\/[a-z0-9-+.*]+)\|(\d+)\|([\s\w.,-]+)/);
|
||||
|
||||
if (metaMatch) {
|
||||
attachment = {
|
||||
type: metaMatch[1],
|
||||
size: metaMatch[2],
|
||||
name: metaMatch[3],
|
||||
};
|
||||
|
||||
if (thumbnail) {
|
||||
attachment.thumbnail = thumbnail;
|
||||
}
|
||||
|
||||
if (linkElement.attr('href') && linkElement.attr('href').match(/^https?:\/\//)) {
|
||||
attachment.data = linkElement.attr('href');
|
||||
body = null;
|
||||
}
|
||||
} else {
|
||||
jsxc.warn('Invalid file type, name or size.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (jsxc.otr.objects.hasOwnProperty(bid) && body) {
|
||||
// @TODO check for file upload url after decryption
|
||||
jsxc.otr.objects[bid].receiveMsg(body, {
|
||||
_uid: mid,
|
||||
stamp: stamp,
|
||||
forwarded: forwarded
|
||||
forwarded: forwarded,
|
||||
attachment: attachment
|
||||
});
|
||||
} else {
|
||||
jsxc.gui.window.postMessage({
|
||||
_uid: mid,
|
||||
bid: bid,
|
||||
direction: jsxc.Message.IN,
|
||||
msg: body,
|
||||
encrypted: false,
|
||||
forwarded: forwarded,
|
||||
stamp: stamp
|
||||
stamp: stamp,
|
||||
attachment: attachment
|
||||
});
|
||||
}
|
||||
|
||||
@@ -934,9 +1082,116 @@ jsxc.xmpp = {
|
||||
return true;
|
||||
},
|
||||
|
||||
onErrorMessage: function(message) {
|
||||
var bid = jsxc.jidToBid($(message).attr('from'));
|
||||
|
||||
if (jsxc.gui.window.get(bid).length === 0 || !$(message).attr('id')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($(message).find('item-not-found').length > 0) {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send_item-not-found')
|
||||
});
|
||||
} else if ($(message).find('forbidden').length > 0) {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send_forbidden')
|
||||
});
|
||||
} else if ($(message).find('not-acceptable').length > 0) {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send_not-acceptable')
|
||||
});
|
||||
} else if ($(message).find('remote-server-not-found').length > 0) {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send_remote-server-not-found')
|
||||
});
|
||||
} else if ($(message).find('service-unavailable').length > 0) {
|
||||
if ($(message).find('[xmlns="' + Strophe.NS.CHATSTATES + '"]').length === 0) {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send_resource-unavailable')
|
||||
});
|
||||
}
|
||||
} else {
|
||||
jsxc.gui.window.postMessage({
|
||||
bid: bid,
|
||||
direction: jsxc.Message.SYS,
|
||||
msg: $.t('message_not_send')
|
||||
});
|
||||
}
|
||||
|
||||
jsxc.debug('error message for ' + bid, $(message).find('error')[0]);
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Process message stanzas of type headline.
|
||||
*
|
||||
* @param {String} stanza Message stanza of type headline
|
||||
* @return {Boolean}
|
||||
*/
|
||||
onHeadlineMessage: function(stanza) {
|
||||
stanza = $(stanza);
|
||||
|
||||
var from = stanza.attr('from');
|
||||
var domain = Strophe.getDomainFromJid(from);
|
||||
|
||||
if (domain !== from) {
|
||||
if (!jsxc.storage.getUserItem('buddy', jsxc.jidToBid(from))) {
|
||||
return true;
|
||||
}
|
||||
} else if (domain !== Strophe.getDomainFromJid(jsxc.xmpp.conn.jid)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var subject = stanza.find('subject:first').text() || $.t('Notification');
|
||||
var body = stanza.find('body:first').text();
|
||||
|
||||
jsxc.notice.add({
|
||||
msg: subject,
|
||||
description: body,
|
||||
type: (domain === from) ? 'announcement' : null
|
||||
}, 'gui.showNotification', [subject, body, from]);
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Respond to version request (XEP-0092).
|
||||
*/
|
||||
onVersionRequest: function(stanza) {
|
||||
stanza = $(stanza);
|
||||
|
||||
var from = stanza.attr('from');
|
||||
var id = stanza.attr('id');
|
||||
|
||||
var iq = $iq({
|
||||
type: 'result',
|
||||
to: from,
|
||||
id: id
|
||||
}).c('query', {
|
||||
xmlns: Strophe.NS.VERSION
|
||||
}).c('name').t('JSXC').up()
|
||||
.c('version').t(jsxc.version);
|
||||
|
||||
jsxc.xmpp.conn.sendIQ(iq);
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggerd if the rid changed
|
||||
*
|
||||
*
|
||||
* @param {integer} rid next valid request id
|
||||
* @private
|
||||
*/
|
||||
@@ -946,7 +1201,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* response to friendship request
|
||||
*
|
||||
*
|
||||
* @param {string} from jid from original friendship req
|
||||
* @param {boolean} approve
|
||||
*/
|
||||
@@ -967,7 +1222,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Add buddy to my friends
|
||||
*
|
||||
*
|
||||
* @param {string} username jid
|
||||
* @param {string} alias
|
||||
*/
|
||||
@@ -992,9 +1247,9 @@ jsxc.xmpp = {
|
||||
type: 'subscribe'
|
||||
}));
|
||||
|
||||
jsxc.storage.removeUserItem('add_' + bid);
|
||||
jsxc.storage.removeUserItem('add', bid);
|
||||
} else {
|
||||
jsxc.storage.setUserItem('add_' + bid, {
|
||||
jsxc.storage.setUserItem('add', bid, {
|
||||
username: username,
|
||||
alias: alias || null
|
||||
});
|
||||
@@ -1003,7 +1258,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Remove buddy from my friends
|
||||
*
|
||||
*
|
||||
* @param {type} jid
|
||||
*/
|
||||
removeBuddy: function(jid) {
|
||||
@@ -1038,39 +1293,59 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Public function to send message.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.xmpp
|
||||
* @param bid css jid of user
|
||||
* @param msg message
|
||||
* @param uid unique id
|
||||
*/
|
||||
sendMessage: function(bid, msg, uid) {
|
||||
if (jsxc.otr.objects.hasOwnProperty(bid)) {
|
||||
jsxc.otr.objects[bid].sendMsg(msg, uid);
|
||||
sendMessage: function(message) {
|
||||
var bid = message.bid;
|
||||
var msg = message.msg;
|
||||
|
||||
var mucRoomNames = (jsxc.xmpp.conn.muc && jsxc.xmpp.conn.muc.roomNames) ? jsxc.xmpp.conn.muc.roomNames : [];
|
||||
var isMucBid = mucRoomNames.indexOf(bid) >= 0;
|
||||
|
||||
if (jsxc.otr.objects.hasOwnProperty(bid) && !isMucBid) {
|
||||
jsxc.otr.objects[bid].sendMsg(msg, message);
|
||||
} else {
|
||||
jsxc.xmpp._sendMessage(jsxc.gui.window.get(bid).data('jid'), msg, uid);
|
||||
jsxc.xmpp._sendMessage(jsxc.gui.window.get(bid).data('jid'), msg, message);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Create message stanza and send it.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.xmpp
|
||||
* @param jid Jabber id
|
||||
* @param msg Message
|
||||
* @param uid unique id
|
||||
* @private
|
||||
*/
|
||||
_sendMessage: function(jid, msg, uid) {
|
||||
_sendMessage: function(jid, msg, message) {
|
||||
// @TODO put jid into message object
|
||||
var data = jsxc.storage.getUserItem('buddy', jsxc.jidToBid(jid)) || {};
|
||||
var isBar = (Strophe.getBareJidFromJid(jid) === jid);
|
||||
var type = data.type || 'chat';
|
||||
message = message || {};
|
||||
|
||||
var xmlMsg = $msg({
|
||||
to: jid,
|
||||
type: type,
|
||||
id: uid
|
||||
}).c('body').t(msg);
|
||||
id: message._uid
|
||||
});
|
||||
|
||||
if (message.type === jsxc.Message.HTML && msg === message.msg && message.htmlMsg) {
|
||||
xmlMsg.c('body').t(msg);
|
||||
|
||||
xmlMsg.up().c('html', {
|
||||
xmlns: Strophe.NS.XHTML_IM
|
||||
}).c('body', {
|
||||
xmlns: Strophe.NS.XHTML
|
||||
}).h(message.htmlMsg).up();
|
||||
} else {
|
||||
xmlMsg.c('body').t(msg);
|
||||
}
|
||||
|
||||
if (jsxc.xmpp.carbons.enabled && msg.match(/^\?OTR/)) {
|
||||
xmlMsg.up().c("private", {
|
||||
@@ -1078,6 +1353,12 @@ jsxc.xmpp = {
|
||||
});
|
||||
}
|
||||
|
||||
if (msg.match(/^\?OTR/)) {
|
||||
xmlMsg.up().c("no-permanent-store", {
|
||||
xmlns: jsxc.CONST.NS.HINTS
|
||||
});
|
||||
}
|
||||
|
||||
if (type === 'chat' && (isBar || jsxc.xmpp.conn.caps.hasFeatureByJid(jid, Strophe.NS.RECEIPTS))) {
|
||||
// Add request according to XEP-0184
|
||||
xmlMsg.up().c('request', {
|
||||
@@ -1085,12 +1366,19 @@ jsxc.xmpp = {
|
||||
});
|
||||
}
|
||||
|
||||
if (jsxc.xmpp.conn.chatstates && !jsxc.xmpp.chatState.isDisabled()) {
|
||||
// send active event (XEP-0085)
|
||||
xmlMsg.up().c('active', {
|
||||
xmlns: Strophe.NS.CHATSTATES
|
||||
});
|
||||
}
|
||||
|
||||
jsxc.xmpp.conn.send(xmlMsg);
|
||||
},
|
||||
|
||||
/**
|
||||
* This function loads a vcard.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.xmpp
|
||||
* @param bid
|
||||
* @param cb
|
||||
@@ -1114,7 +1402,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Retrieves capabilities.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.xmpp
|
||||
* @param jid
|
||||
* @returns List of known capabilities
|
||||
@@ -1136,7 +1424,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Test if jid has given features
|
||||
*
|
||||
*
|
||||
* @param {string} jid Jabber id
|
||||
* @param {string[]} feature Single feature or list of features
|
||||
* @param {Function} cb Called with the result as first param.
|
||||
@@ -1188,7 +1476,7 @@ jsxc.xmpp = {
|
||||
|
||||
/**
|
||||
* Handle carbons (XEP-0280);
|
||||
*
|
||||
*
|
||||
* @namespace jsxc.xmpp.carbons
|
||||
*/
|
||||
jsxc.xmpp.carbons = {
|
||||
@@ -1196,7 +1484,7 @@ jsxc.xmpp.carbons = {
|
||||
|
||||
/**
|
||||
* Enable carbons.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.xmpp.carbons
|
||||
* @param cb callback
|
||||
*/
|
||||
@@ -1222,7 +1510,7 @@ jsxc.xmpp.carbons = {
|
||||
|
||||
/**
|
||||
* Disable carbons.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.xmpp.carbons
|
||||
* @param cb callback
|
||||
*/
|
||||
@@ -1248,7 +1536,7 @@ jsxc.xmpp.carbons = {
|
||||
|
||||
/**
|
||||
* Enable/Disable carbons depending on options key.
|
||||
*
|
||||
*
|
||||
* @memberOf jsxc.xmpp.carbons
|
||||
* @param err error message
|
||||
*/
|
||||
@@ -1274,13 +1562,13 @@ jsxc.xmpp.carbons = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -0,0 +1,268 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: jsxc.lib.xmpp.mam.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: jsxc.lib.xmpp.mam.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* Implements XEP-0313: Message Archive Management.
|
||||
*
|
||||
* @namespace jsxc.xmpp.mam
|
||||
* @see {@link https://xmpp.org/extensions/xep-0313.html}
|
||||
*/
|
||||
jsxc.xmpp.mam = {
|
||||
conn: null
|
||||
};
|
||||
|
||||
jsxc.xmpp.mam.init = function() {
|
||||
var self = jsxc.xmpp.mam;
|
||||
|
||||
self.conn = jsxc.xmpp.conn;
|
||||
};
|
||||
|
||||
jsxc.xmpp.mam.isEnabled = function() {
|
||||
var mamOptions = jsxc.options.get('mam') || {};
|
||||
|
||||
var features = jsxc.storage.getUserItem('features') || [];
|
||||
var hasFeatureMam2 = features.indexOf(Strophe.NS.MAM) >= 0;
|
||||
|
||||
return hasFeatureMam2 && mamOptions.enable;
|
||||
};
|
||||
|
||||
jsxc.xmpp.mam.nextMessages = function(bid) {
|
||||
var self = jsxc.xmpp.mam;
|
||||
var buddyData = jsxc.storage.getUserItem('buddy', bid) || {};
|
||||
var lastArchiveUid = buddyData.lastArchiveUid;
|
||||
var queryId = self.conn.getUniqueId();
|
||||
var mamOptions = jsxc.options.get('mam') || {};
|
||||
var history = jsxc.storage.getUserItem('history', bid) || [];
|
||||
|
||||
if (buddyData.archiveExhausted) {
|
||||
jsxc.debug('No more archived messages.');
|
||||
return;
|
||||
}
|
||||
|
||||
var queryOptions = {
|
||||
queryid: queryId,
|
||||
before: lastArchiveUid || '',
|
||||
with: bid,
|
||||
onMessage: function() {
|
||||
var args = Array.from(arguments);
|
||||
args.unshift(bid);
|
||||
self.onMessage.apply(this, args);
|
||||
return true;
|
||||
},
|
||||
onComplete: function() {
|
||||
var args = Array.from(arguments);
|
||||
args.unshift(bid);
|
||||
self.onComplete.apply(this, args);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
var oldestMessageId = history[history.length - 1];
|
||||
|
||||
if (oldestMessageId && !lastArchiveUid) {
|
||||
var oldestMessage = new jsxc.Message(oldestMessageId);
|
||||
queryOptions.end = (new Date(oldestMessage.stamp)).toISOString();
|
||||
}
|
||||
|
||||
if (mamOptions.max) {
|
||||
queryOptions.max = mamOptions.max;
|
||||
}
|
||||
|
||||
self.conn.mam.query(undefined, queryOptions);
|
||||
};
|
||||
|
||||
jsxc.xmpp.mam.onMessage = function(bid, stanza) {
|
||||
stanza = $(stanza);
|
||||
var result = stanza.find('result[xmlns="' + Strophe.NS.MAM + '"]');
|
||||
var queryId = result.attr('queryid');
|
||||
|
||||
if (result.length !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
var forwarded = result.find('forwarded[xmlns="' + jsxc.CONST.NS.FORWARD + '"]');
|
||||
var message = forwarded.find('message');
|
||||
var messageId = $(message).attr('id');
|
||||
|
||||
if (message.length !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
var from = message.attr('from');
|
||||
var to = message.attr('to');
|
||||
|
||||
if (jsxc.jidToBid(from) !== bid && jsxc.jidToBid(to) !== bid) {
|
||||
return;
|
||||
}
|
||||
|
||||
var delay = forwarded.find('delay[xmlns="urn:xmpp:delay"]');
|
||||
var stamp = (delay.length > 0) ? new Date(delay.attr('stamp')) : new Date();
|
||||
stamp = stamp.getTime();
|
||||
|
||||
var body = $(message).find('body:first').text();
|
||||
|
||||
if (!body || body.match(/\?OTR/i)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var direction = (jsxc.jidToBid(to) === bid) ? jsxc.Message.OUT : jsxc.Message.IN;
|
||||
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
var textarea = win.find('.jsxc_textarea');
|
||||
if (textarea.find('[id="' + messageId + '"]').length === 0) {
|
||||
var pseudoChatElement = $('<div>');
|
||||
pseudoChatElement.attr('id', messageId.replace(/:/g, '-'));
|
||||
pseudoChatElement.attr('data-queryId', queryId);
|
||||
|
||||
var lastMessage = textarea.find('[data-queryId="' + queryId + '"]').last();
|
||||
var history = jsxc.storage.getUserItem('history', bid) || [];
|
||||
|
||||
if (history.indexOf(messageId) < 0) {
|
||||
if (lastMessage.length === 0) {
|
||||
textarea.prepend(pseudoChatElement);
|
||||
history.push(messageId);
|
||||
} else {
|
||||
lastMessage.after(pseudoChatElement);
|
||||
history.splice(history.indexOf(lastMessage.attr('id').replace(/-/g, ':')), 0, messageId);
|
||||
}
|
||||
}
|
||||
|
||||
jsxc.storage.setUserItem('history', bid, history);
|
||||
}
|
||||
|
||||
jsxc.gui.window.postMessage({
|
||||
_uid: messageId,
|
||||
bid: bid,
|
||||
direction: direction,
|
||||
msg: body,
|
||||
encrypted: false,
|
||||
forwarded: true,
|
||||
stamp: stamp
|
||||
});
|
||||
};
|
||||
|
||||
jsxc.xmpp.mam.onComplete = function(bid, stanza) {
|
||||
stanza = $(stanza);
|
||||
var fin = stanza.find('fin[xmlns="' + Strophe.NS.MAM + '"]');
|
||||
var buddyData = jsxc.storage.getUserItem('buddy', bid) || {};
|
||||
var win = jsxc.gui.window.get(bid);
|
||||
|
||||
buddyData.archiveExhausted = fin.attr('complete') === 'true';
|
||||
buddyData.lastArchiveUid = fin.find('first').text();
|
||||
|
||||
if (buddyData.archiveExhausted) {
|
||||
win.find('.jsxc_fade').removeClass('jsxc_mam-enable');
|
||||
}
|
||||
|
||||
jsxc.storage.setUserItem('buddy', bid, buddyData);
|
||||
};
|
||||
|
||||
jsxc.xmpp.mam.initWindow = function(ev, win) {
|
||||
var self = jsxc.xmpp.mam;
|
||||
|
||||
if (!jsxc.xmpp.conn && jsxc.master) {
|
||||
$(document).one('attached.jsxc', function() {
|
||||
self.initWindow(null, win);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!jsxc.master) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(document).on('features.jsxc', function() {
|
||||
jsxc.xmpp.mam.addLoadButton(win);
|
||||
});
|
||||
|
||||
var features = jsxc.storage.getUserItem('features');
|
||||
if (features !== null) {
|
||||
// features.jsxc was already fired
|
||||
jsxc.xmpp.mam.addLoadButton(win);
|
||||
}
|
||||
};
|
||||
|
||||
jsxc.xmpp.mam.addLoadButton = function(win) {
|
||||
if (!jsxc.xmpp.mam.isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var classNameShow = 'jsxc_show';
|
||||
var classNameMamEnable = 'jsxc_mam-enable';
|
||||
var bid = win.attr('data-bid');
|
||||
|
||||
var element = $('<div>');
|
||||
element.addClass('jsxc_mam-load-more');
|
||||
element.appendTo(win.find('.slimScrollDiv'));
|
||||
element.click(function() {
|
||||
jsxc.xmpp.mam.nextMessages(bid);
|
||||
});
|
||||
element.text($.t('Load_older_messages'));
|
||||
|
||||
win.find('.jsxc_textarea').scroll(function() {
|
||||
var buddyData = jsxc.storage.getUserItem('buddy', bid) || {};
|
||||
|
||||
if (this.scrollTop < 42 && !buddyData.archiveExhausted) {
|
||||
element.addClass(classNameShow);
|
||||
} else {
|
||||
element.removeClass(classNameShow);
|
||||
}
|
||||
|
||||
if (!buddyData.archiveExhausted) {
|
||||
win.find('.jsxc_fade').addClass(classNameMamEnable);
|
||||
}
|
||||
});
|
||||
|
||||
win.find('.jsxc_textarea').scroll();
|
||||
};
|
||||
|
||||
$(document).on('attached.jsxc', jsxc.xmpp.mam.init);
|
||||
$(document).on('init.window.jsxc', jsxc.xmpp.mam.initWindow);
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:22 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
+17
-17
@@ -282,7 +282,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1448">line 1448</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1460">line 1460</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line930">line 930</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line988">line 988</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line572">line 572</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line629">line 629</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -643,7 +643,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line536">line 536</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line593">line 593</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -774,7 +774,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1261">line 1261</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1318">line 1318</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -856,7 +856,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line105">line 105</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line108">line 108</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1033,7 +1033,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1173">line 1173</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1231">line 1231</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1304,7 +1304,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line452">line 452</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line509">line 509</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1435,7 +1435,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line481">line 481</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line538">line 538</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1607,7 +1607,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line906">line 906</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line964">line 964</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1783,7 +1783,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1138">line 1138</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1196">line 1196</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1937,7 +1937,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1216">line 1216</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1273">line 1273</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2091,7 +2091,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1232">line 1232</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line1289">line 1289</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2267,7 +2267,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line120">line 120</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line125">line 125</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2398,7 +2398,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line364">line 364</a>
|
||||
<a href="jsxc.lib.muc.js.html">jsxc.lib.muc.js</a>, <a href="jsxc.lib.muc.js.html#line421">line 421</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2440,13 +2440,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line193">line 193</a>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line196">line 196</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ default api.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line252">line 252</a>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line255">line 255</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -978,7 +978,7 @@ default api.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line205">line 205</a>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line208">line 208</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1143,7 +1143,7 @@ messages.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line174">line 174</a>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line177">line 177</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1225,7 +1225,7 @@ messages.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line236">line 236</a>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line239">line 239</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1357,7 +1357,7 @@ messages.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line267">line 267</a>
|
||||
<a href="jsxc.lib.notification.js.html">jsxc.lib.notification.js</a>, <a href="jsxc.lib.notification.js.html#line270">line 270</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1399,13 +1399,13 @@ messages.
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+401
-141
@@ -290,6 +290,130 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".chatState"><span class="type-signature">(static) </span>chatState<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Default option for chat state notifications
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line291">line 291</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".defaultAvatar"><span class="type-signature">(static) </span>defaultAvatar<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
If no avatar is found, this function is called.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line177">line 177</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".defaultLang"><span class="type-signature">(static) </span>defaultLang<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
@@ -396,7 +520,69 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line232">line 232</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line230">line 230</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".fileTransfer"><span class="type-signature">(static) </span>fileTransfer<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Options for file transfer.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line283">line 283</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -600,6 +786,130 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".mam"><span class="type-signature">(static) </span>mam<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Options for Message Archive Management (XEP-0313)
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line309">line 309</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".maxStorableSize"><span class="type-signature">(static) </span>maxStorableSize<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Maximal storage size for attachments received via data channels (webrtc).
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line280">line 280</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".muteNotification"><span class="type-signature">(static) </span>muteNotification<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
@@ -830,7 +1140,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line263">line 263</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line261">line 261</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1202,7 +1512,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line246">line 246</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line244">line 244</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1220,6 +1530,85 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".screenMediaExtension"><span class="type-signature">(static) </span>screenMediaExtension<span class="type-signature"> :Object</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Download urls to screen media extensions.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">Object</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line301">line 301</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-see">See:</dt>
|
||||
<dd class="tag-see">
|
||||
<ul>
|
||||
<li>example extensions <a href="https://github.com/otalk/getScreenMedia">https://github.com/otalk/getScreenMedia</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".timeout"><span class="type-signature">(static) </span>timeout<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
@@ -1324,7 +1713,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line243">line 243</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line241">line 241</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1412,135 +1801,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".defaultAvatar"><span class="type-signature">(static) </span>defaultAvatar<span class="signature">(jid)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
If no avatar is found, this function is called.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>This:</h5>
|
||||
<ul><li>{jQuery}</li></ul>
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>jid</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Jid of that user.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line177">line 177</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".displayRosterMinimized"><span class="type-signature">(static) </span>displayRosterMinimized<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
@@ -1632,7 +1892,7 @@ connection is found.
|
||||
|
||||
|
||||
<div class="description">
|
||||
This function is called if a login form was found, but before any
|
||||
This function is called if a login form was found, but before any
|
||||
modification is done to it.
|
||||
</div>
|
||||
|
||||
@@ -1808,7 +2068,7 @@ modification is done to it.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line216">line 216</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line234">line 234</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1972,7 +2232,7 @@ modification is done to it.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line221">line 221</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line219">line 219</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2149,7 +2409,7 @@ modification is done to it.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line196">line 196</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line194">line 194</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2293,7 +2553,7 @@ modification is done to it.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line205">line 205</a>
|
||||
<a href="jsxc.lib.options.js.html">jsxc.lib.options.js</a>, <a href="jsxc.lib.options.js.html#line203">line 203</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2447,7 +2707,7 @@ modification is done to it.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line232">line 232</a>
|
||||
<a href="jsxc.lib.js.html">jsxc.lib.js</a>, <a href="jsxc.lib.js.html#line250">line 250</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2489,13 +2749,13 @@ modification is done to it.
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+14
-14
@@ -224,7 +224,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line500">line 500</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line504">line 504</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line349">line 349</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line353">line 353</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line68">line 68</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line70">line 70</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -586,7 +586,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line416">line 416</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line420">line 420</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -735,7 +735,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line514">line 514</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line518">line 518</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -866,7 +866,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line314">line 314</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line318">line 318</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1033,7 +1033,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line331">line 331</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line335">line 335</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1225,7 +1225,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line251">line 251</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line255">line 255</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1646,7 +1646,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line381">line 381</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line385">line 385</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1800,7 +1800,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line54">line 54</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line56">line 56</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2005,7 +2005,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line284">line 284</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line288">line 288</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2154,7 +2154,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line296">line 296</a>
|
||||
<a href="jsxc.lib.otr.js.html">jsxc.lib.otr.js</a>, <a href="jsxc.lib.otr.js.html#line300">line 300</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2214,13 +2214,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+14
-14
@@ -298,7 +298,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line89">line 89</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line109">line 109</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line21">line 21</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line37">line 37</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -573,7 +573,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line106">line 106</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line126">line 126</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -737,7 +737,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line219">line 219</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line239">line 239</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -986,7 +986,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line269">line 269</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line289">line 289</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1163,7 +1163,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line232">line 232</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line252">line 252</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1335,7 +1335,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line125">line 125</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line145">line 145</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1461,7 +1461,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line143">line 143</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line163">line 163</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1605,7 +1605,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line595">line 595</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line620">line 620</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1804,7 +1804,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line39">line 39</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2044,7 +2044,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line165">line 165</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line185">line 185</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2284,7 +2284,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line198">line 198</a>
|
||||
<a href="jsxc.lib.storage.js.html">jsxc.lib.storage.js</a>, <a href="jsxc.lib.storage.js.html#line218">line 218</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2326,13 +2326,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+314
-2
@@ -102,6 +102,318 @@
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".execMaster"><span class="type-signature">(static) </span>execMaster<span class="signature">(cmd, params)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Execute command in master tab.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>cmd</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">String</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Command</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>params</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Array.<String></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">List of parameters</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.tab.js.html">jsxc.lib.tab.js</a>, <a href="jsxc.lib.tab.js.html#line41">line 41</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".execSlave"><span class="type-signature">(static) </span>execSlave<span class="signature">(cmd, params)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Execute command in all slave tabs.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>cmd</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">String</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Command</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>params</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Array.<String></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">List of parameters</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.tab.js.html">jsxc.lib.tab.js</a>, <a href="jsxc.lib.tab.js.html#line54">line 54</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -116,13 +428,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:05 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+1306
-15
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -278,7 +278,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line235">line 235</a>
|
||||
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line239">line 239</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line165">line 165</a>
|
||||
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line169">line 169</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -677,7 +677,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line146">line 146</a>
|
||||
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line150">line 150</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -974,7 +974,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line299">line 299</a>
|
||||
<a href="jsxc.lib.xmpp.bookmarks.js.html">jsxc.lib.xmpp.bookmarks.js</a>, <a href="jsxc.lib.xmpp.bookmarks.js.html#line303">line 303</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1016,13 +1016,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:06 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1161">line 1161</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1449">line 1449</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1201">line 1201</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1489">line 1489</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1175">line 1175</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1463">line 1463</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1227">line 1227</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1515">line 1515</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -498,13 +498,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:06 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+251
-11
@@ -106,6 +106,15 @@
|
||||
|
||||
<dt><a href="jsxc.xmpp.carbons.html">carbons</a></dt>
|
||||
<dd></dd>
|
||||
|
||||
<dt><a href="jsxc.xmpp.chatState.html">chatState</a></dt>
|
||||
<dd></dd>
|
||||
|
||||
<dt><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></dt>
|
||||
<dd></dd>
|
||||
|
||||
<dt><a href="jsxc.xmpp.mam.html">mam</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@@ -242,7 +251,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line946">line 946</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1201">line 1201</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -368,7 +377,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1094">line 1094</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1382">line 1382</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -555,7 +564,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1117">line 1117</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1405">line 1405</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -739,7 +748,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1071">line 1071</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1359">line 1359</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -870,7 +879,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line183">line 183</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line185">line 185</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -918,6 +927,237 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".onHeadlineMessage"><span class="type-signature">(static) </span>onHeadlineMessage<span class="signature">(stanza)</span><span class="type-signature"> → {Boolean}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Process message stanzas of type headline.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>stanza</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">String</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Message stanza of type headline</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1115">line 1115</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">Boolean</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".onVersionRequest"><span class="type-signature">(static) </span>onVersionRequest<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Respond to version request (XEP-0092).
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1144">line 1144</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".removeBuddy"><span class="type-signature">(static) </span>removeBuddy<span class="signature">(jid)</span><span class="type-signature"></span></h4>
|
||||
|
||||
@@ -1019,7 +1259,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line981">line 981</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1236">line 1236</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1173,7 +1413,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line925">line 925</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1180">line 1180</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1335,7 +1575,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1019">line 1019</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line1274">line 1274</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1417,7 +1657,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line388">line 388</a>
|
||||
<a href="jsxc.lib.xmpp.js.html">jsxc.lib.xmpp.js</a>, <a href="jsxc.lib.xmpp.js.html#line407">line 407</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1459,13 +1699,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Fri Oct 28 2016 13:29:06 GMT+0200 (CEST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -0,0 +1,138 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Namespace: mam</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Namespace: mam</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
<h2>
|
||||
<span class="ancestors"><a href="jsxc.html">jsxc</a><a href="jsxc.xmpp.html">.xmpp</a>.</span>mam</h2>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
<div class="description">Implements XEP-0313: Message Archive Management.</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="jsxc.lib.xmpp.mam.js.html">jsxc.lib.xmpp.mam.js</a>, <a href="jsxc.lib.xmpp.mam.js.html#line1">line 1</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-see">See:</dt>
|
||||
<dd class="tag-see">
|
||||
<ul>
|
||||
<li><a href="https://xmpp.org/extensions/xep-0313.html">https://xmpp.org/extensions/xep-0313.html</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsxc.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="jsxc.html">jsxc</a></li><li><a href="jsxc.fileTransfer.html">fileTransfer</a></li><li><a href="jsxc.gui.html">gui</a></li><li><a href="jsxc.gui.dialog.html">dialog</a></li><li><a href="jsxc.gui.queryActions.html">queryActions</a></li><li><a href="jsxc.gui.roster.html">roster</a></li><li><a href="jsxc.gui.window.html">window</a></li><li><a href="jsxc.muc.html">muc</a></li><li><a href="jsxc.notification.html">notification</a></li><li><a href="jsxc.options.html">options</a></li><li><a href="jsxc.otr.html">otr</a></li><li><a href="jsxc.storage.html">storage</a></li><li><a href="jsxc.tab.html">tab</a></li><li><a href="jsxc.webrtc.html">webrtc</a></li><li><a href="jsxc.xmpp.html">xmpp</a></li><li><a href="jsxc.xmpp.bookmarks.html">bookmarks</a></li><li><a href="jsxc.xmpp.carbons.html">carbons</a></li><li><a href="jsxc.xmpp.chatState.html">chatState</a></li><li><a href="jsxc.xmpp.httpUpload.html">httpUpload</a></li><li><a href="jsxc.xmpp.mam.html">mam</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jun 01 2017 14:24:23 GMT+0200 (CEST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
<link href="css/example.css" media="all" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- require:dependencies -->
|
||||
<script src="../dev/lib/jquery.min.js"></script>
|
||||
<script src="../dev/lib/jquery.ui.min.js"></script>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/jquery-ui.min.js"></script>
|
||||
<script src="../dev/lib/jquery.slimscroll.js"></script>
|
||||
<script src="../dev/lib/jquery.fullscreen.js"></script>
|
||||
<script src="../dev/lib/jsxc.dep.js"></script>
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<link href="css/example.css" media="all" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- require:dependencies -->
|
||||
<script src="../build/lib/jquery.min.js"></script>
|
||||
<script src="../build/lib/jquery.ui.min.js"></script>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/jquery-ui.min.js"></script>
|
||||
<script src="../build/lib/jquery.slimscroll.js"></script>
|
||||
<script src="../build/lib/jquery.fullscreen.js"></script>
|
||||
<script src="../build/lib/jsxc.dep.js"></script>
|
||||
|
||||
@@ -117,6 +117,7 @@ $(function() {
|
||||
localStorage.setItem('bosh-url', url);
|
||||
localStorage.setItem('xmpp-domain', domain);
|
||||
|
||||
jsxc.options.xmpp.url = url;
|
||||
settings.xmpp.url = url;
|
||||
settings.xmpp.domain = domain;
|
||||
|
||||
|
||||
externo
+13
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
+4
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -12,8 +12,8 @@
|
||||
<link href="../build/css/jquery-ui.min.css" media="all" rel="stylesheet" type="text/css" />
|
||||
<link href="../build/css/jsxc.css" media="all" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="../build/lib/jquery.min.js"></script>
|
||||
<script src="../build/lib/jquery.ui.min.js"></script>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/jquery-ui.min.js"></script>
|
||||
<script src="../build/lib/jquery.slimscroll.js"></script>
|
||||
<script src="../build/lib/jquery.fullscreen.js"></script>
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
;
|
||||
(function(root) {
|
||||
"use strict";
|
||||
|
||||
root.OTR = {}
|
||||
root.crypto = {}
|
||||
root.DSA = {};
|
||||
|
||||
// default imports
|
||||
var imports = [
|
||||
'build/dep/salsa20.js',
|
||||
'build/dep/bigint.js',
|
||||
'build/dep/crypto.js',
|
||||
'build/dep/eventemitter.js',
|
||||
'lib/const.js',
|
||||
'lib/helpers.js',
|
||||
'lib/dsa.js',
|
||||
]
|
||||
|
||||
function sendMsg(type, data) {
|
||||
postMessage({
|
||||
type: type,
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
self.onmessage = function(e) {
|
||||
var data = e.data;
|
||||
|
||||
root.crypto = {
|
||||
getRandomValues: function() {
|
||||
var buf = data.random;
|
||||
}
|
||||
};
|
||||
|
||||
if (data.imports)
|
||||
imports = data.imports
|
||||
|
||||
importScripts.apply(self, imports);
|
||||
|
||||
sendMsg('debug', 'DSA key creation started')
|
||||
|
||||
var dsa = new DSA()
|
||||
|
||||
sendMsg('debug', 'DSA key creation finished')
|
||||
|
||||
sendMsg('data', {key: dsa.packPrivate()})
|
||||
}
|
||||
|
||||
}(this))
|
||||
@@ -1,241 +0,0 @@
|
||||
/* basic scrollbar styling */
|
||||
/* vertical scrollbar */
|
||||
.mCSB_container {
|
||||
width: auto;
|
||||
margin-right: 30px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mCSB_container.mCS_no_scrollbar {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.mCS_disabled .mCSB_container.mCS_no_scrollbar,.mCS_destroyed .mCSB_container.mCS_no_scrollbar
|
||||
{
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.mCustomScrollBox .mCSB_scrollTools {
|
||||
width: 16px;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerContainer {
|
||||
height: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp+.mCSB_draggerContainer {
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerRail {
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown {
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonDown {
|
||||
bottom: 0;
|
||||
margin-top: -40px;
|
||||
}
|
||||
/* horizontal scrollbar */
|
||||
.mCSB_horizontal .mCSB_container {
|
||||
height: auto;
|
||||
margin-right: 0;
|
||||
margin-bottom: 30px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mCSB_horizontal .mCSB_container.mCS_no_scrollbar {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mCS_disabled .mCSB_horizontal .mCSB_container.mCS_no_scrollbar,.mCS_destroyed .mCSB_horizontal .mCSB_container.mCS_no_scrollbar
|
||||
{
|
||||
margin-right: 0;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.mCSB_horizontal.mCustomScrollBox .mCSB_scrollTools {
|
||||
width: 100%;
|
||||
height: 16px;
|
||||
top: auto;
|
||||
right: auto;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerContainer {
|
||||
height: 100%;
|
||||
width: auto;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft+.mCSB_draggerContainer
|
||||
{
|
||||
padding-bottom: 0;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerRail {
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
margin: 7px 0;
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_dragger {
|
||||
width: 30px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
margin: 6px auto;
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft,.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight
|
||||
{
|
||||
width: 20px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
|
||||
right: 0;
|
||||
bottom: auto;
|
||||
margin-left: -40px;
|
||||
margin-top: -16px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* default scrollbar colors and backgrounds */
|
||||
.mCustomScrollBox .mCSB_scrollTools {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.mCustomScrollBox:hover .mCSB_scrollTools {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerRail {
|
||||
background: #000; /* rgba fallback */
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
filter: "alpha(opacity=40)";
|
||||
-ms-filter: "alpha(opacity=40)"; /* old ie */
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
|
||||
background: #fff; /* rgba fallback */
|
||||
background: rgba(255, 255, 255, 0.75);
|
||||
filter: "alpha(opacity=75)";
|
||||
-ms-filter: "alpha(opacity=75)"; /* old ie */
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
filter: "alpha(opacity=85)";
|
||||
-ms-filter: "alpha(opacity=85)"; /* old ie */
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar
|
||||
{
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
filter: "alpha(opacity=90)";
|
||||
-ms-filter: "alpha(opacity=90)"; /* old ie */
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight
|
||||
{
|
||||
background-image: url(mCSB_buttons.png);
|
||||
background-repeat: no-repeat;
|
||||
opacity: 0.4;
|
||||
filter: "alpha(opacity=40)";
|
||||
-ms-filter: "alpha(opacity=40)"; /* old ie */
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp {
|
||||
background-position: 0 0;
|
||||
/*
|
||||
sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
|
||||
*/
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonDown {
|
||||
background-position: 0 -20px;
|
||||
/*
|
||||
sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
|
||||
*/
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonLeft {
|
||||
background-position: 0 -40px;
|
||||
/*
|
||||
sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
|
||||
*/
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonRight {
|
||||
background-position: 0 -56px;
|
||||
/*
|
||||
sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
|
||||
*/
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp:hover,.mCSB_scrollTools .mCSB_buttonDown:hover,.mCSB_scrollTools .mCSB_buttonLeft:hover,.mCSB_scrollTools .mCSB_buttonRight:hover
|
||||
{
|
||||
opacity: 0.75;
|
||||
filter: "alpha(opacity=75)";
|
||||
-ms-filter: "alpha(opacity=75)"; /* old ie */
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_buttonUp:active,.mCSB_scrollTools .mCSB_buttonDown:active,.mCSB_scrollTools .mCSB_buttonLeft:active,.mCSB_scrollTools .mCSB_buttonRight:active
|
||||
{
|
||||
opacity: 0.9;
|
||||
filter: "alpha(opacity=90)";
|
||||
-ms-filter: "alpha(opacity=90)"; /* old ie */
|
||||
}
|
||||
externo
-4
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
-7
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+1
-1
Submodule lib/strophe.jinglejs updated: 651a2ba8d2...aac6d4610b
@@ -0,0 +1,314 @@
|
||||
{
|
||||
"translation": {
|
||||
"Logging_in": "يتم تسجيل الدخول…",
|
||||
"your_connection_is_unencrypted": null,
|
||||
"your_connection_is_encrypted": null,
|
||||
"your_buddy_closed_the_private_connection": null,
|
||||
"start_private": null,
|
||||
"close_private": null,
|
||||
"your_buddy_is_verificated": null,
|
||||
"you_have_only_a_subscription_in_one_way": null,
|
||||
"authentication_query_sent": null,
|
||||
"your_message_wasnt_send_please_end_your_private_conversation": null,
|
||||
"unencrypted_message_received": null,
|
||||
"not_available": null,
|
||||
"no_connection": null,
|
||||
"relogin": null,
|
||||
"trying_to_start_private_conversation": null,
|
||||
"Verified": null,
|
||||
"Unverified": null,
|
||||
"private_conversation_aborted": null,
|
||||
"your_buddy_closed_the_private_conversation_you_should_do_the_same": null,
|
||||
"conversation_is_now_verified": null,
|
||||
"authentication_failed": null,
|
||||
"Creating_your_private_key_": null,
|
||||
"Authenticating_a_buddy_helps_": null,
|
||||
"How_do_you_want_to_authenticate_your_buddy": null,
|
||||
"Select_method": null,
|
||||
"Manual": null,
|
||||
"Question": null,
|
||||
"Secret": null,
|
||||
"To_verify_the_fingerprint_": null,
|
||||
"Your_fingerprint": null,
|
||||
"Buddy_fingerprint": null,
|
||||
"Close": null,
|
||||
"Compared": null,
|
||||
"To_authenticate_using_a_question_": null,
|
||||
"Ask": null,
|
||||
"To_authenticate_pick_a_secret_": null,
|
||||
"Compare": null,
|
||||
"Fingerprints": null,
|
||||
"Authentication": null,
|
||||
"Message": null,
|
||||
"Add_buddy": null,
|
||||
"rename_buddy": null,
|
||||
"delete_buddy": null,
|
||||
"Login": null,
|
||||
"Username": null,
|
||||
"Password": null,
|
||||
"Cancel": null,
|
||||
"Connect": null,
|
||||
"Type_in_the_full_username_": null,
|
||||
"Alias": null,
|
||||
"Add": null,
|
||||
"Subscription_request": null,
|
||||
"You_have_a_request_from": null,
|
||||
"Deny": null,
|
||||
"Approve": null,
|
||||
"Remove_buddy": null,
|
||||
"You_are_about_to_remove_": null,
|
||||
"Continue_without_chat": null,
|
||||
"Please_wait": null,
|
||||
"Login_failed": null,
|
||||
"Sorry_we_cant_authentikate_": null,
|
||||
"Retry": null,
|
||||
"clear_history": null,
|
||||
"New_message_from": null,
|
||||
"Should_we_notify_you_": null,
|
||||
"Please_accept_": null,
|
||||
"Hide_offline": null,
|
||||
"Show_offline": null,
|
||||
"About": null,
|
||||
"dnd": null,
|
||||
"Mute": null,
|
||||
"Unmute": null,
|
||||
"Subscription": null,
|
||||
"both": null,
|
||||
"Status": null,
|
||||
"online": null,
|
||||
"chat": null,
|
||||
"away": null,
|
||||
"xa": null,
|
||||
"offline": null,
|
||||
"none": null,
|
||||
"Unknown_instance_tag": null,
|
||||
"Not_one_of_our_latest_keys": null,
|
||||
"Received_an_unreadable_encrypted_message": null,
|
||||
"Online": null,
|
||||
"Chatty": null,
|
||||
"Away": null,
|
||||
"Extended_away": null,
|
||||
"Offline": null,
|
||||
"Friendship_request": null,
|
||||
"Confirm": null,
|
||||
"Dismiss": null,
|
||||
"Remove": null,
|
||||
"Online_help": null,
|
||||
"FN": null,
|
||||
"N": null,
|
||||
"FAMILY": null,
|
||||
"GIVEN": null,
|
||||
"NICKNAME": null,
|
||||
"URL": null,
|
||||
"ADR": null,
|
||||
"STREET": null,
|
||||
"EXTADD": null,
|
||||
"LOCALITY": null,
|
||||
"REGION": null,
|
||||
"PCODE": null,
|
||||
"CTRY": null,
|
||||
"TEL": null,
|
||||
"NUMBER": null,
|
||||
"EMAIL": null,
|
||||
"USERID": null,
|
||||
"ORG": null,
|
||||
"ORGNAME": null,
|
||||
"ORGUNIT": null,
|
||||
"TITLE": null,
|
||||
"ROLE": null,
|
||||
"BDAY": null,
|
||||
"DESC": null,
|
||||
"PHOTO": null,
|
||||
"send_message": null,
|
||||
"get_info": null,
|
||||
"Settings": null,
|
||||
"Priority": null,
|
||||
"Save": null,
|
||||
"User_settings": null,
|
||||
"A_fingerprint_": null,
|
||||
"is": null,
|
||||
"Login_options": null,
|
||||
"BOSH_url": null,
|
||||
"Domain": null,
|
||||
"Resource": null,
|
||||
"On_login": null,
|
||||
"Received_an_unencrypted_message": null,
|
||||
"Sorry_your_buddy_doesnt_provide_any_information": null,
|
||||
"Info_about": null,
|
||||
"Authentication_aborted": null,
|
||||
"Authentication_request_received": null,
|
||||
"Log_in_without_chat": null,
|
||||
"has_come_online": null,
|
||||
"Unknown_sender": null,
|
||||
"Please_allow_access_to_microphone_and_camera": null,
|
||||
"Incoming_call": null,
|
||||
"from": null,
|
||||
"Do_you_want_to_accept_the_call_from": null,
|
||||
"Reject": null,
|
||||
"Accept": null,
|
||||
"hang_up": null,
|
||||
"snapshot": null,
|
||||
"mute_my_audio": null,
|
||||
"pause_my_video": null,
|
||||
"fullscreen": null,
|
||||
"Info": null,
|
||||
"Local_IP": null,
|
||||
"Remote_IP": null,
|
||||
"Local_Fingerprint": null,
|
||||
"Remote_Fingerprint": null,
|
||||
"Video_call_not_possible": null,
|
||||
"Start_video_call": null,
|
||||
"Join_chat": null,
|
||||
"Join": null,
|
||||
"Room": null,
|
||||
"Nickname": null,
|
||||
"left_the_building": null,
|
||||
"entered_the_room": null,
|
||||
"is_now_known_as": null,
|
||||
"This_room_is": null,
|
||||
"muc_hidden": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_membersonly": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_moderated": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_nonanonymous": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_open": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_passwordprotected": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_persistent": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_public": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_semianonymous": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_temporary": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_unmoderated": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_unsecured": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"Continue": null,
|
||||
"Server": null,
|
||||
"Rooms_are_loaded": null,
|
||||
"Could_load_only": null,
|
||||
"muc_explanation": null,
|
||||
"You_already_joined_this_room": null,
|
||||
"This_room_will_be_closed": null,
|
||||
"Room_not_found_": null,
|
||||
"Loading_room_information": null,
|
||||
"Destroy": null,
|
||||
"Leave": null,
|
||||
"changed_subject_to": null,
|
||||
"muc_removed_kicked": null,
|
||||
"muc_removed_info_kicked": null,
|
||||
"muc_removed_banned": null,
|
||||
"muc_removed_info_banned": null,
|
||||
"muc_removed_affiliation": null,
|
||||
"muc_removed_info_affiliation": null,
|
||||
"muc_removed_membersonly": null,
|
||||
"muc_removed_info_membersonly": null,
|
||||
"muc_removed_shutdown": null,
|
||||
"Reason": null,
|
||||
"message_not_send": null,
|
||||
"message_not_send_item-not-found": null,
|
||||
"message_not_send_forbidden": null,
|
||||
"message_not_send_not-acceptable": null,
|
||||
"message_not_send_resource-unavailable": null,
|
||||
"message_not_send_remote-server-not-found": null,
|
||||
"This_room_has_been_closed": null,
|
||||
"Room_logging_is_enabled": null,
|
||||
"A_password_is_required": null,
|
||||
"You_are_not_on_the_member_list": null,
|
||||
"You_are_banned_from_this_room": null,
|
||||
"Your_desired_nickname_": null,
|
||||
"The_maximum_number_": null,
|
||||
"This_room_is_locked_": null,
|
||||
"You_are_not_allowed_to_create_": null,
|
||||
"Alert": null,
|
||||
"Call_started": null,
|
||||
"Call_terminated": null,
|
||||
"Carbon_copy": null,
|
||||
"Enable": null,
|
||||
"jingle_reason_busy": null,
|
||||
"jingle_reason_decline": null,
|
||||
"jingle_reason_success": null,
|
||||
"Media_failure": null,
|
||||
"No_local_audio_device": null,
|
||||
"No_local_video_device": null,
|
||||
"Ok": null,
|
||||
"PermissionDeniedError": null,
|
||||
"Use_local_audio_device": null,
|
||||
"Use_local_video_device": null,
|
||||
"is_": null,
|
||||
"You_received_a_message_from_an_unknown_sender_": null,
|
||||
"Your_roster_is_empty_add_": null,
|
||||
"onsmp_explanation_question": null,
|
||||
"onsmp_explanation_secret": null,
|
||||
"from_sender": null,
|
||||
"Verified_private_conversation_started": null,
|
||||
"Unverified_private_conversation_started": null,
|
||||
"Bookmark": null,
|
||||
"Auto-join": null,
|
||||
"Edit_bookmark": null,
|
||||
"Room_logging_is_disabled": null,
|
||||
"Room_is_now_non-anoymous": null,
|
||||
"Room_is_now_semi-anonymous": null,
|
||||
"Do_you_want_to_change_the_default_room_configuration": null,
|
||||
"Default": null,
|
||||
"Change": null,
|
||||
"Send_file": null,
|
||||
"setting-explanation-carbon": null,
|
||||
"setting-explanation-login": null,
|
||||
"setting-explanation-priority": null,
|
||||
"setting-explanation-xmpp": null,
|
||||
"_is_composing": null,
|
||||
"_are_composing": null,
|
||||
"Chat_state_notifications": null,
|
||||
"setting-explanation-chat-state": null,
|
||||
"Share_screen": null,
|
||||
"Incoming_stream": null,
|
||||
"Stream_started": null,
|
||||
"HTTPS_REQUIRED": null,
|
||||
"EXTENSION_UNAVAILABLE": null,
|
||||
"UNKNOWN_ERROR": null,
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null,
|
||||
"Notification": null,
|
||||
"Unreadable_OTR_message": null,
|
||||
"Load_older_messages": null,
|
||||
"Message_history": null,
|
||||
"setting-mam-enable": null,
|
||||
"File_too_large": null,
|
||||
"No_proper_file_transfer_method_available": null,
|
||||
"You_have_to_go_online_": null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
{
|
||||
"translation": {
|
||||
"Logging_in": null,
|
||||
"your_connection_is_unencrypted": null,
|
||||
"your_connection_is_encrypted": null,
|
||||
"your_buddy_closed_the_private_connection": null,
|
||||
"start_private": null,
|
||||
"close_private": null,
|
||||
"your_buddy_is_verificated": null,
|
||||
"you_have_only_a_subscription_in_one_way": null,
|
||||
"authentication_query_sent": null,
|
||||
"your_message_wasnt_send_please_end_your_private_conversation": null,
|
||||
"unencrypted_message_received": null,
|
||||
"not_available": null,
|
||||
"no_connection": null,
|
||||
"relogin": null,
|
||||
"trying_to_start_private_conversation": null,
|
||||
"Verified": null,
|
||||
"Unverified": null,
|
||||
"private_conversation_aborted": null,
|
||||
"your_buddy_closed_the_private_conversation_you_should_do_the_same": null,
|
||||
"conversation_is_now_verified": null,
|
||||
"authentication_failed": null,
|
||||
"Creating_your_private_key_": null,
|
||||
"Authenticating_a_buddy_helps_": null,
|
||||
"How_do_you_want_to_authenticate_your_buddy": null,
|
||||
"Select_method": null,
|
||||
"Manual": null,
|
||||
"Question": null,
|
||||
"Secret": null,
|
||||
"To_verify_the_fingerprint_": null,
|
||||
"Your_fingerprint": null,
|
||||
"Buddy_fingerprint": null,
|
||||
"Close": null,
|
||||
"Compared": null,
|
||||
"To_authenticate_using_a_question_": null,
|
||||
"Ask": null,
|
||||
"To_authenticate_pick_a_secret_": null,
|
||||
"Compare": null,
|
||||
"Fingerprints": null,
|
||||
"Authentication": null,
|
||||
"Message": null,
|
||||
"Add_buddy": null,
|
||||
"rename_buddy": null,
|
||||
"delete_buddy": null,
|
||||
"Login": null,
|
||||
"Username": null,
|
||||
"Password": null,
|
||||
"Cancel": null,
|
||||
"Connect": null,
|
||||
"Type_in_the_full_username_": null,
|
||||
"Alias": null,
|
||||
"Add": null,
|
||||
"Subscription_request": null,
|
||||
"You_have_a_request_from": null,
|
||||
"Deny": null,
|
||||
"Approve": null,
|
||||
"Remove_buddy": null,
|
||||
"You_are_about_to_remove_": null,
|
||||
"Continue_without_chat": null,
|
||||
"Please_wait": null,
|
||||
"Login_failed": null,
|
||||
"Sorry_we_cant_authentikate_": null,
|
||||
"Retry": null,
|
||||
"clear_history": null,
|
||||
"New_message_from": null,
|
||||
"Should_we_notify_you_": null,
|
||||
"Please_accept_": null,
|
||||
"Hide_offline": null,
|
||||
"Show_offline": null,
|
||||
"About": null,
|
||||
"dnd": null,
|
||||
"Mute": null,
|
||||
"Unmute": null,
|
||||
"Subscription": null,
|
||||
"both": null,
|
||||
"Status": null,
|
||||
"online": null,
|
||||
"chat": null,
|
||||
"away": null,
|
||||
"xa": null,
|
||||
"offline": null,
|
||||
"none": null,
|
||||
"Unknown_instance_tag": null,
|
||||
"Not_one_of_our_latest_keys": null,
|
||||
"Received_an_unreadable_encrypted_message": null,
|
||||
"Online": null,
|
||||
"Chatty": null,
|
||||
"Away": null,
|
||||
"Extended_away": null,
|
||||
"Offline": null,
|
||||
"Friendship_request": null,
|
||||
"Confirm": null,
|
||||
"Dismiss": null,
|
||||
"Remove": null,
|
||||
"Online_help": null,
|
||||
"FN": null,
|
||||
"N": null,
|
||||
"FAMILY": null,
|
||||
"GIVEN": null,
|
||||
"NICKNAME": null,
|
||||
"URL": null,
|
||||
"ADR": null,
|
||||
"STREET": null,
|
||||
"EXTADD": null,
|
||||
"LOCALITY": null,
|
||||
"REGION": null,
|
||||
"PCODE": null,
|
||||
"CTRY": null,
|
||||
"TEL": null,
|
||||
"NUMBER": null,
|
||||
"EMAIL": null,
|
||||
"USERID": null,
|
||||
"ORG": null,
|
||||
"ORGNAME": null,
|
||||
"ORGUNIT": null,
|
||||
"TITLE": null,
|
||||
"ROLE": null,
|
||||
"BDAY": null,
|
||||
"DESC": null,
|
||||
"PHOTO": null,
|
||||
"send_message": null,
|
||||
"get_info": null,
|
||||
"Settings": null,
|
||||
"Priority": null,
|
||||
"Save": null,
|
||||
"User_settings": null,
|
||||
"A_fingerprint_": null,
|
||||
"is": null,
|
||||
"Login_options": null,
|
||||
"BOSH_url": null,
|
||||
"Domain": null,
|
||||
"Resource": null,
|
||||
"On_login": null,
|
||||
"Received_an_unencrypted_message": null,
|
||||
"Sorry_your_buddy_doesnt_provide_any_information": null,
|
||||
"Info_about": null,
|
||||
"Authentication_aborted": null,
|
||||
"Authentication_request_received": null,
|
||||
"Log_in_without_chat": null,
|
||||
"has_come_online": null,
|
||||
"Unknown_sender": null,
|
||||
"Please_allow_access_to_microphone_and_camera": null,
|
||||
"Incoming_call": null,
|
||||
"from": null,
|
||||
"Do_you_want_to_accept_the_call_from": null,
|
||||
"Reject": null,
|
||||
"Accept": null,
|
||||
"hang_up": null,
|
||||
"snapshot": null,
|
||||
"mute_my_audio": null,
|
||||
"pause_my_video": null,
|
||||
"fullscreen": null,
|
||||
"Info": null,
|
||||
"Local_IP": null,
|
||||
"Remote_IP": null,
|
||||
"Local_Fingerprint": null,
|
||||
"Remote_Fingerprint": null,
|
||||
"Video_call_not_possible": null,
|
||||
"Start_video_call": null,
|
||||
"Join_chat": null,
|
||||
"Join": null,
|
||||
"Room": null,
|
||||
"Nickname": null,
|
||||
"left_the_building": null,
|
||||
"entered_the_room": null,
|
||||
"is_now_known_as": null,
|
||||
"This_room_is": null,
|
||||
"muc_hidden": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_membersonly": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_moderated": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_nonanonymous": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_open": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_passwordprotected": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_persistent": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_public": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_semianonymous": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_temporary": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_unmoderated": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_unsecured": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"Continue": null,
|
||||
"Server": null,
|
||||
"Rooms_are_loaded": null,
|
||||
"Could_load_only": null,
|
||||
"muc_explanation": null,
|
||||
"You_already_joined_this_room": null,
|
||||
"This_room_will_be_closed": null,
|
||||
"Room_not_found_": null,
|
||||
"Loading_room_information": null,
|
||||
"Destroy": null,
|
||||
"Leave": null,
|
||||
"changed_subject_to": null,
|
||||
"muc_removed_kicked": null,
|
||||
"muc_removed_info_kicked": null,
|
||||
"muc_removed_banned": null,
|
||||
"muc_removed_info_banned": null,
|
||||
"muc_removed_affiliation": null,
|
||||
"muc_removed_info_affiliation": null,
|
||||
"muc_removed_membersonly": null,
|
||||
"muc_removed_info_membersonly": null,
|
||||
"muc_removed_shutdown": null,
|
||||
"Reason": null,
|
||||
"message_not_send": null,
|
||||
"message_not_send_item-not-found": null,
|
||||
"message_not_send_forbidden": null,
|
||||
"message_not_send_not-acceptable": null,
|
||||
"message_not_send_resource-unavailable": null,
|
||||
"message_not_send_remote-server-not-found": null,
|
||||
"This_room_has_been_closed": null,
|
||||
"Room_logging_is_enabled": null,
|
||||
"A_password_is_required": null,
|
||||
"You_are_not_on_the_member_list": null,
|
||||
"You_are_banned_from_this_room": null,
|
||||
"Your_desired_nickname_": null,
|
||||
"The_maximum_number_": null,
|
||||
"This_room_is_locked_": null,
|
||||
"You_are_not_allowed_to_create_": null,
|
||||
"Alert": null,
|
||||
"Call_started": null,
|
||||
"Call_terminated": null,
|
||||
"Carbon_copy": null,
|
||||
"Enable": null,
|
||||
"jingle_reason_busy": null,
|
||||
"jingle_reason_decline": null,
|
||||
"jingle_reason_success": null,
|
||||
"Media_failure": null,
|
||||
"No_local_audio_device": null,
|
||||
"No_local_video_device": null,
|
||||
"Ok": null,
|
||||
"PermissionDeniedError": null,
|
||||
"Use_local_audio_device": null,
|
||||
"Use_local_video_device": null,
|
||||
"is_": null,
|
||||
"You_received_a_message_from_an_unknown_sender_": null,
|
||||
"Your_roster_is_empty_add_": null,
|
||||
"onsmp_explanation_question": null,
|
||||
"onsmp_explanation_secret": null,
|
||||
"from_sender": null,
|
||||
"Verified_private_conversation_started": null,
|
||||
"Unverified_private_conversation_started": null,
|
||||
"Bookmark": null,
|
||||
"Auto-join": null,
|
||||
"Edit_bookmark": null,
|
||||
"Room_logging_is_disabled": null,
|
||||
"Room_is_now_non-anoymous": null,
|
||||
"Room_is_now_semi-anonymous": null,
|
||||
"Do_you_want_to_change_the_default_room_configuration": null,
|
||||
"Default": null,
|
||||
"Change": null,
|
||||
"Send_file": null,
|
||||
"setting-explanation-carbon": null,
|
||||
"setting-explanation-login": null,
|
||||
"setting-explanation-priority": null,
|
||||
"setting-explanation-xmpp": null,
|
||||
"_is_composing": null,
|
||||
"_are_composing": null,
|
||||
"Chat_state_notifications": null,
|
||||
"setting-explanation-chat-state": null,
|
||||
"Share_screen": null,
|
||||
"Incoming_stream": null,
|
||||
"Stream_started": null,
|
||||
"HTTPS_REQUIRED": null,
|
||||
"EXTENSION_UNAVAILABLE": null,
|
||||
"UNKNOWN_ERROR": null,
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null,
|
||||
"Notification": null,
|
||||
"Unreadable_OTR_message": null,
|
||||
"Load_older_messages": null,
|
||||
"Message_history": null,
|
||||
"setting-mam-enable": null,
|
||||
"File_too_large": null,
|
||||
"No_proper_file_transfer_method_available": null,
|
||||
"You_have_to_go_online_": null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
{
|
||||
"translation": {
|
||||
"Logging_in": null,
|
||||
"your_connection_is_unencrypted": null,
|
||||
"your_connection_is_encrypted": null,
|
||||
"your_buddy_closed_the_private_connection": null,
|
||||
"start_private": null,
|
||||
"close_private": null,
|
||||
"your_buddy_is_verificated": null,
|
||||
"you_have_only_a_subscription_in_one_way": null,
|
||||
"authentication_query_sent": null,
|
||||
"your_message_wasnt_send_please_end_your_private_conversation": null,
|
||||
"unencrypted_message_received": null,
|
||||
"not_available": null,
|
||||
"no_connection": null,
|
||||
"relogin": null,
|
||||
"trying_to_start_private_conversation": null,
|
||||
"Verified": null,
|
||||
"Unverified": null,
|
||||
"private_conversation_aborted": null,
|
||||
"your_buddy_closed_the_private_conversation_you_should_do_the_same": null,
|
||||
"conversation_is_now_verified": null,
|
||||
"authentication_failed": null,
|
||||
"Creating_your_private_key_": null,
|
||||
"Authenticating_a_buddy_helps_": null,
|
||||
"How_do_you_want_to_authenticate_your_buddy": null,
|
||||
"Select_method": null,
|
||||
"Manual": null,
|
||||
"Question": null,
|
||||
"Secret": null,
|
||||
"To_verify_the_fingerprint_": null,
|
||||
"Your_fingerprint": null,
|
||||
"Buddy_fingerprint": null,
|
||||
"Close": null,
|
||||
"Compared": null,
|
||||
"To_authenticate_using_a_question_": null,
|
||||
"Ask": null,
|
||||
"To_authenticate_pick_a_secret_": null,
|
||||
"Compare": null,
|
||||
"Fingerprints": null,
|
||||
"Authentication": null,
|
||||
"Message": null,
|
||||
"Add_buddy": null,
|
||||
"rename_buddy": null,
|
||||
"delete_buddy": null,
|
||||
"Login": null,
|
||||
"Username": null,
|
||||
"Password": null,
|
||||
"Cancel": null,
|
||||
"Connect": null,
|
||||
"Type_in_the_full_username_": null,
|
||||
"Alias": null,
|
||||
"Add": null,
|
||||
"Subscription_request": null,
|
||||
"You_have_a_request_from": null,
|
||||
"Deny": null,
|
||||
"Approve": null,
|
||||
"Remove_buddy": null,
|
||||
"You_are_about_to_remove_": null,
|
||||
"Continue_without_chat": null,
|
||||
"Please_wait": null,
|
||||
"Login_failed": null,
|
||||
"Sorry_we_cant_authentikate_": null,
|
||||
"Retry": null,
|
||||
"clear_history": null,
|
||||
"New_message_from": null,
|
||||
"Should_we_notify_you_": null,
|
||||
"Please_accept_": null,
|
||||
"Hide_offline": null,
|
||||
"Show_offline": null,
|
||||
"About": null,
|
||||
"dnd": null,
|
||||
"Mute": null,
|
||||
"Unmute": null,
|
||||
"Subscription": null,
|
||||
"both": null,
|
||||
"Status": null,
|
||||
"online": null,
|
||||
"chat": null,
|
||||
"away": null,
|
||||
"xa": null,
|
||||
"offline": null,
|
||||
"none": null,
|
||||
"Unknown_instance_tag": null,
|
||||
"Not_one_of_our_latest_keys": null,
|
||||
"Received_an_unreadable_encrypted_message": null,
|
||||
"Online": null,
|
||||
"Chatty": null,
|
||||
"Away": null,
|
||||
"Extended_away": null,
|
||||
"Offline": null,
|
||||
"Friendship_request": null,
|
||||
"Confirm": null,
|
||||
"Dismiss": null,
|
||||
"Remove": null,
|
||||
"Online_help": null,
|
||||
"FN": null,
|
||||
"N": null,
|
||||
"FAMILY": null,
|
||||
"GIVEN": null,
|
||||
"NICKNAME": null,
|
||||
"URL": null,
|
||||
"ADR": null,
|
||||
"STREET": null,
|
||||
"EXTADD": null,
|
||||
"LOCALITY": null,
|
||||
"REGION": null,
|
||||
"PCODE": null,
|
||||
"CTRY": null,
|
||||
"TEL": null,
|
||||
"NUMBER": null,
|
||||
"EMAIL": null,
|
||||
"USERID": null,
|
||||
"ORG": null,
|
||||
"ORGNAME": null,
|
||||
"ORGUNIT": null,
|
||||
"TITLE": null,
|
||||
"ROLE": null,
|
||||
"BDAY": null,
|
||||
"DESC": null,
|
||||
"PHOTO": null,
|
||||
"send_message": null,
|
||||
"get_info": null,
|
||||
"Settings": null,
|
||||
"Priority": null,
|
||||
"Save": null,
|
||||
"User_settings": null,
|
||||
"A_fingerprint_": null,
|
||||
"is": null,
|
||||
"Login_options": null,
|
||||
"BOSH_url": null,
|
||||
"Domain": null,
|
||||
"Resource": null,
|
||||
"On_login": null,
|
||||
"Received_an_unencrypted_message": null,
|
||||
"Sorry_your_buddy_doesnt_provide_any_information": null,
|
||||
"Info_about": null,
|
||||
"Authentication_aborted": null,
|
||||
"Authentication_request_received": null,
|
||||
"Log_in_without_chat": null,
|
||||
"has_come_online": null,
|
||||
"Unknown_sender": null,
|
||||
"Please_allow_access_to_microphone_and_camera": null,
|
||||
"Incoming_call": null,
|
||||
"from": null,
|
||||
"Do_you_want_to_accept_the_call_from": null,
|
||||
"Reject": null,
|
||||
"Accept": null,
|
||||
"hang_up": null,
|
||||
"snapshot": null,
|
||||
"mute_my_audio": null,
|
||||
"pause_my_video": null,
|
||||
"fullscreen": null,
|
||||
"Info": null,
|
||||
"Local_IP": null,
|
||||
"Remote_IP": null,
|
||||
"Local_Fingerprint": null,
|
||||
"Remote_Fingerprint": null,
|
||||
"Video_call_not_possible": null,
|
||||
"Start_video_call": null,
|
||||
"Join_chat": null,
|
||||
"Join": null,
|
||||
"Room": null,
|
||||
"Nickname": null,
|
||||
"left_the_building": null,
|
||||
"entered_the_room": null,
|
||||
"is_now_known_as": null,
|
||||
"This_room_is": null,
|
||||
"muc_hidden": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_membersonly": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_moderated": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_nonanonymous": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_open": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_passwordprotected": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_persistent": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_public": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_semianonymous": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_temporary": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_unmoderated": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"muc_unsecured": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
},
|
||||
"Continue": null,
|
||||
"Server": null,
|
||||
"Rooms_are_loaded": null,
|
||||
"Could_load_only": null,
|
||||
"muc_explanation": null,
|
||||
"You_already_joined_this_room": null,
|
||||
"This_room_will_be_closed": null,
|
||||
"Room_not_found_": null,
|
||||
"Loading_room_information": null,
|
||||
"Destroy": null,
|
||||
"Leave": null,
|
||||
"changed_subject_to": null,
|
||||
"muc_removed_kicked": null,
|
||||
"muc_removed_info_kicked": null,
|
||||
"muc_removed_banned": null,
|
||||
"muc_removed_info_banned": null,
|
||||
"muc_removed_affiliation": null,
|
||||
"muc_removed_info_affiliation": null,
|
||||
"muc_removed_membersonly": null,
|
||||
"muc_removed_info_membersonly": null,
|
||||
"muc_removed_shutdown": null,
|
||||
"Reason": null,
|
||||
"message_not_send": null,
|
||||
"message_not_send_item-not-found": null,
|
||||
"message_not_send_forbidden": null,
|
||||
"message_not_send_not-acceptable": null,
|
||||
"message_not_send_resource-unavailable": null,
|
||||
"message_not_send_remote-server-not-found": null,
|
||||
"This_room_has_been_closed": null,
|
||||
"Room_logging_is_enabled": null,
|
||||
"A_password_is_required": null,
|
||||
"You_are_not_on_the_member_list": null,
|
||||
"You_are_banned_from_this_room": null,
|
||||
"Your_desired_nickname_": null,
|
||||
"The_maximum_number_": null,
|
||||
"This_room_is_locked_": null,
|
||||
"You_are_not_allowed_to_create_": null,
|
||||
"Alert": null,
|
||||
"Call_started": null,
|
||||
"Call_terminated": null,
|
||||
"Carbon_copy": null,
|
||||
"Enable": null,
|
||||
"jingle_reason_busy": null,
|
||||
"jingle_reason_decline": null,
|
||||
"jingle_reason_success": null,
|
||||
"Media_failure": null,
|
||||
"No_local_audio_device": null,
|
||||
"No_local_video_device": null,
|
||||
"Ok": null,
|
||||
"PermissionDeniedError": null,
|
||||
"Use_local_audio_device": null,
|
||||
"Use_local_video_device": null,
|
||||
"is_": null,
|
||||
"You_received_a_message_from_an_unknown_sender_": null,
|
||||
"Your_roster_is_empty_add_": null,
|
||||
"onsmp_explanation_question": null,
|
||||
"onsmp_explanation_secret": null,
|
||||
"from_sender": null,
|
||||
"Verified_private_conversation_started": null,
|
||||
"Unverified_private_conversation_started": null,
|
||||
"Bookmark": null,
|
||||
"Auto-join": null,
|
||||
"Edit_bookmark": null,
|
||||
"Room_logging_is_disabled": null,
|
||||
"Room_is_now_non-anoymous": null,
|
||||
"Room_is_now_semi-anonymous": null,
|
||||
"Do_you_want_to_change_the_default_room_configuration": null,
|
||||
"Default": null,
|
||||
"Change": null,
|
||||
"Send_file": null,
|
||||
"setting-explanation-carbon": null,
|
||||
"setting-explanation-login": null,
|
||||
"setting-explanation-priority": null,
|
||||
"setting-explanation-xmpp": null,
|
||||
"_is_composing": null,
|
||||
"_are_composing": null,
|
||||
"Chat_state_notifications": null,
|
||||
"setting-explanation-chat-state": null,
|
||||
"Share_screen": null,
|
||||
"Incoming_stream": null,
|
||||
"Stream_started": null,
|
||||
"HTTPS_REQUIRED": null,
|
||||
"EXTENSION_UNAVAILABLE": null,
|
||||
"UNKNOWN_ERROR": null,
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null,
|
||||
"Notification": null,
|
||||
"Unreadable_OTR_message": null,
|
||||
"Load_older_messages": null,
|
||||
"Message_history": null,
|
||||
"setting-mam-enable": null,
|
||||
"File_too_large": null,
|
||||
"No_proper_file_transfer_method_available": null,
|
||||
"You_have_to_go_online_": null
|
||||
}
|
||||
}
|
||||
+29
-19
@@ -56,7 +56,7 @@
|
||||
"Deny": "Ablehnen",
|
||||
"Approve": "Bestätigen",
|
||||
"Remove_buddy": "Kontakt entfernen",
|
||||
"You_are_about_to_remove_": "Du bist gerade dabei __bid_name__ (<b>__bid_jid__</b>) von deiner Kontaktliste zu entfernen. Alle Chats werden geschlossen.",
|
||||
"You_are_about_to_remove_": "Du bist gerade dabei __bid_name__ (<b>__bid_jid__</b>) von deiner Kontaktliste zu entfernen. Alle zugehörigen Chats werden geschlossen.",
|
||||
"Continue_without_chat": "Weiter ohne Chat",
|
||||
"Please_wait": "Bitte warten",
|
||||
"Login_failed": "Chat-Anmeldung fehlgeschlagen",
|
||||
@@ -95,7 +95,7 @@
|
||||
"Remove": "Löschen",
|
||||
"Online_help": "Online Hilfe",
|
||||
"FN": "Name",
|
||||
"N": " ",
|
||||
"N": "Name",
|
||||
"FAMILY": "Familienname",
|
||||
"GIVEN": "Vorname",
|
||||
"NICKNAME": "Spitzname",
|
||||
@@ -110,7 +110,7 @@
|
||||
"TEL": "Telefon",
|
||||
"NUMBER": "Nummer",
|
||||
"EMAIL": "E-Mail",
|
||||
"USERID": " ",
|
||||
"USERID": "Benutzerkennung",
|
||||
"ORG": "Organisation",
|
||||
"ORGNAME": "Name",
|
||||
"ORGUNIT": "Abteilung",
|
||||
@@ -118,7 +118,7 @@
|
||||
"ROLE": "Rolle",
|
||||
"BDAY": "Geburtstag",
|
||||
"DESC": "Beschreibung",
|
||||
"PHOTO": " ",
|
||||
"PHOTO": "Foto",
|
||||
"send_message": "Sende Nachricht",
|
||||
"get_info": "Benutzerinformationen",
|
||||
"Settings": "Einstellungen",
|
||||
@@ -240,6 +240,8 @@
|
||||
"message_not_send_item-not-found": "Deine Nachricht wurde nicht versandt, da der Raum nicht mehr existiert",
|
||||
"message_not_send_forbidden": "Deine Nachricht wurde nicht versandt, da du kein \"Mitspracherecht\" hast",
|
||||
"message_not_send_not-acceptable": "Deine Nachricht wurde nicht versandt, da du kein Mitglied dieser Gruppe bist",
|
||||
"message_not_send_resource-unavailable": "Ihre Nachricht wurde nicht gesendet, weil Ihr Gesprächspartner sich nicht verbunden hat",
|
||||
"message_not_send_remote-server-not-found": "Ihre Nachricht wurde nicht gesendet, weil keine Server-zu-Server Verbindung aufgebaut werden konnte",
|
||||
"This_room_has_been_closed": "Diese Gruppe wurde geschlossen",
|
||||
"Room_logging_is_enabled": "Gesprächsverlauf kann öffentlich einsehbar sein",
|
||||
"A_password_is_required": "Es wird ein Passwort benötigt",
|
||||
@@ -265,10 +267,10 @@
|
||||
"Use_local_audio_device": "Nutze eigenes Audio Gerät",
|
||||
"Use_local_video_device": "Benutze eigene Webcam",
|
||||
"is_": "ist __status__",
|
||||
"You_received_a_message_from_an_unknown_sender_": "Du hast eine Nachricht von einem unbekannten Sender erhalten (__sender__) Möchtest du sie sehen?",
|
||||
"You_received_a_message_from_an_unknown_sender_": "Du hast eine Nachricht von einem unbekannten Absender erhalten (__sender__). Möchtest du sie sehen?",
|
||||
"Your_roster_is_empty_add_": "Deine Kontaktliste ist leer, füge einen neuen Kontakt <a>hinzu</a>",
|
||||
"onsmp_explanation_question": "Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib die Antwort ein und klick auf Antworten.",
|
||||
"onsmp_explanation_secret": "Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib das Geheimnis ein.",
|
||||
"onsmp_explanation_question": "Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib die Antwort ein und klick auf Antworten.",
|
||||
"onsmp_explanation_secret": "Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib das Geheimnis ein.",
|
||||
"from_sender": "von __sender__",
|
||||
"Verified_private_conversation_started": "Verifizierte private Konversation gestartet.",
|
||||
"Unverified_private_conversation_started": "Unverifizierte private Konversation gestartet.",
|
||||
@@ -283,22 +285,30 @@
|
||||
"Change": "Ändern",
|
||||
"Send_file": "Datei senden",
|
||||
"setting-explanation-carbon": "Wenn Kopien aktiviert sind, werden alle eingehenden Nachrichten zu allen angemeldeten Clients gesendet.",
|
||||
"setting-explanation-login": "Wenn diese Option aktiviert ist, wird der Chat beim anmelden automatisch gestartet.",
|
||||
"setting-explanation-login": "Wenn diese Option aktiviert ist, wird der Chat beim Anmelden automatisch gestartet.",
|
||||
"setting-explanation-priority": "Wenn du mit deinem XMPP Konto mehrfach angemeldet bist, werden Nachrichten zu dem Client mit der höchsten Priorität zugestellt.",
|
||||
"setting-explanation-xmpp": "Diese Optionen werden für die Verbindung zum XMPP server genutzt.",
|
||||
"setting-explanation-xmpp": "Diese Optionen werden für die Verbindung zum XMPP Server genutzt.",
|
||||
"_is_composing": " tippt gerade...",
|
||||
"_are_composing": " tippen gerade...",
|
||||
"Chat_state_notifications": "Statusbenachrichtigungen",
|
||||
"setting-explanation-chat-state": "Möchtest Benachrichtigungen senden und erhalten wenn du oder dein Kontakt Nachrichten tippt?",
|
||||
"Share_screen": null,
|
||||
"Incoming_stream": null,
|
||||
"Stream_started": null,
|
||||
"HTTPS_REQUIRED": null,
|
||||
"EXTENSION_UNAVAILABLE": null,
|
||||
"UNKNOWN_ERROR": null,
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": "Schließe alle"
|
||||
"Share_screen": "Teile Bildschirm",
|
||||
"Incoming_stream": "Eingehender Stream",
|
||||
"Stream_started": "Stream gestarted",
|
||||
"HTTPS_REQUIRED": "Diese Aktion erfordert eine verschlüsselte Verbindung.",
|
||||
"EXTENSION_UNAVAILABLE": "Sie benötigen eine Browser Erweiterung.",
|
||||
"UNKNOWN_ERROR": "Ein unbekannter Fehler ist aufgetreten.",
|
||||
"Install_extension": "Bitte installieren Sie die Erweiterung um ihren Bildschirm zu teilen: ",
|
||||
"Connection_accepted": "Verbindung angenommen",
|
||||
"Stream_terminated": "Stream beendet",
|
||||
"Close_all": "Schließe alle",
|
||||
"Notification": "Benachrichtigung",
|
||||
"Unreadable_OTR_message": "Unlesbare OTR Nachricht verworfen",
|
||||
"Load_older_messages": "Ältere Nachrichten laden",
|
||||
"Message_history": "Nachrichten Verlauf",
|
||||
"setting-mam-enable": "Falls aktiviert können Sie gespeicherte Nachrichten vom Server abrufen",
|
||||
"File_too_large": "Datei zu groß",
|
||||
"No_proper_file_transfer_method_available": "Keine geeignete Übertragungsmethode verfügbar",
|
||||
"You_have_to_go_online_": "Du musst online sein um diese Aktion auszuführen."
|
||||
}
|
||||
}
|
||||
+286
-276
@@ -1,304 +1,314 @@
|
||||
{
|
||||
"translation": {
|
||||
"Logging_in": null,
|
||||
"your_connection_is_unencrypted": null,
|
||||
"your_connection_is_encrypted": null,
|
||||
"your_buddy_closed_the_private_connection": null,
|
||||
"start_private": null,
|
||||
"close_private": null,
|
||||
"your_buddy_is_verificated": null,
|
||||
"you_have_only_a_subscription_in_one_way": null,
|
||||
"authentication_query_sent": null,
|
||||
"your_message_wasnt_send_please_end_your_private_conversation": null,
|
||||
"unencrypted_message_received": null,
|
||||
"not_available": null,
|
||||
"no_connection": null,
|
||||
"relogin": null,
|
||||
"trying_to_start_private_conversation": null,
|
||||
"Verified": null,
|
||||
"Unverified": null,
|
||||
"private_conversation_aborted": null,
|
||||
"your_buddy_closed_the_private_conversation_you_should_do_the_same": null,
|
||||
"conversation_is_now_verified": null,
|
||||
"authentication_failed": null,
|
||||
"Creating_your_private_key_": null,
|
||||
"Authenticating_a_buddy_helps_": null,
|
||||
"How_do_you_want_to_authenticate_your_buddy": null,
|
||||
"Select_method": null,
|
||||
"Manual": null,
|
||||
"Question": null,
|
||||
"Secret": null,
|
||||
"To_verify_the_fingerprint_": null,
|
||||
"Your_fingerprint": null,
|
||||
"Buddy_fingerprint": null,
|
||||
"Close": null,
|
||||
"Compared": null,
|
||||
"To_authenticate_using_a_question_": null,
|
||||
"Ask": null,
|
||||
"To_authenticate_pick_a_secret_": null,
|
||||
"Compare": null,
|
||||
"Fingerprints": null,
|
||||
"Authentication": null,
|
||||
"Message": null,
|
||||
"Add_buddy": null,
|
||||
"rename_buddy": null,
|
||||
"delete_buddy": null,
|
||||
"Login": null,
|
||||
"Username": null,
|
||||
"Password": null,
|
||||
"Cancel": null,
|
||||
"Connect": null,
|
||||
"Type_in_the_full_username_": null,
|
||||
"Alias": null,
|
||||
"Add": null,
|
||||
"Subscription_request": null,
|
||||
"You_have_a_request_from": null,
|
||||
"Deny": null,
|
||||
"Approve": null,
|
||||
"Remove_buddy": null,
|
||||
"You_are_about_to_remove_": null,
|
||||
"Continue_without_chat": null,
|
||||
"Please_wait": null,
|
||||
"Login_failed": null,
|
||||
"Sorry_we_cant_authentikate_": null,
|
||||
"Retry": null,
|
||||
"clear_history": null,
|
||||
"New_message_from": null,
|
||||
"Should_we_notify_you_": null,
|
||||
"Please_accept_": null,
|
||||
"Hide_offline": null,
|
||||
"Show_offline": null,
|
||||
"About": null,
|
||||
"dnd": null,
|
||||
"Mute": null,
|
||||
"Unmute": null,
|
||||
"Subscription": null,
|
||||
"both": null,
|
||||
"Status": null,
|
||||
"online": null,
|
||||
"chat": null,
|
||||
"away": null,
|
||||
"xa": null,
|
||||
"offline": null,
|
||||
"none": null,
|
||||
"Unknown_instance_tag": null,
|
||||
"Not_one_of_our_latest_keys": null,
|
||||
"Received_an_unreadable_encrypted_message": null,
|
||||
"Online": null,
|
||||
"Chatty": null,
|
||||
"Away": null,
|
||||
"Extended_away": null,
|
||||
"Offline": null,
|
||||
"Friendship_request": null,
|
||||
"Confirm": null,
|
||||
"Dismiss": null,
|
||||
"Remove": null,
|
||||
"Online_help": null,
|
||||
"FN": null,
|
||||
"N": null,
|
||||
"FAMILY": null,
|
||||
"GIVEN": null,
|
||||
"NICKNAME": null,
|
||||
"URL": null,
|
||||
"ADR": null,
|
||||
"STREET": null,
|
||||
"EXTADD": null,
|
||||
"LOCALITY": null,
|
||||
"REGION": null,
|
||||
"PCODE": null,
|
||||
"CTRY": null,
|
||||
"TEL": null,
|
||||
"NUMBER": null,
|
||||
"EMAIL": null,
|
||||
"USERID": null,
|
||||
"ORG": null,
|
||||
"ORGNAME": null,
|
||||
"ORGUNIT": null,
|
||||
"TITLE": null,
|
||||
"ROLE": null,
|
||||
"BDAY": null,
|
||||
"DESC": null,
|
||||
"PHOTO": null,
|
||||
"send_message": null,
|
||||
"get_info": null,
|
||||
"Settings": null,
|
||||
"Priority": null,
|
||||
"Save": null,
|
||||
"User_settings": null,
|
||||
"A_fingerprint_": null,
|
||||
"is": null,
|
||||
"Login_options": null,
|
||||
"BOSH_url": null,
|
||||
"Domain": null,
|
||||
"Resource": null,
|
||||
"On_login": null,
|
||||
"Received_an_unencrypted_message": null,
|
||||
"Sorry_your_buddy_doesnt_provide_any_information": null,
|
||||
"Info_about": null,
|
||||
"Authentication_aborted": null,
|
||||
"Authentication_request_received": null,
|
||||
"Log_in_without_chat": null,
|
||||
"has_come_online": null,
|
||||
"Unknown_sender": null,
|
||||
"Please_allow_access_to_microphone_and_camera": null,
|
||||
"Incoming_call": null,
|
||||
"from": null,
|
||||
"Do_you_want_to_accept_the_call_from": null,
|
||||
"Reject": null,
|
||||
"Accept": null,
|
||||
"hang_up": null,
|
||||
"snapshot": null,
|
||||
"mute_my_audio": null,
|
||||
"pause_my_video": null,
|
||||
"fullscreen": null,
|
||||
"Info": null,
|
||||
"Local_IP": null,
|
||||
"Remote_IP": null,
|
||||
"Local_Fingerprint": null,
|
||||
"Remote_Fingerprint": null,
|
||||
"Video_call_not_possible": null,
|
||||
"Start_video_call": null,
|
||||
"Join_chat": null,
|
||||
"Join": null,
|
||||
"Room": null,
|
||||
"Nickname": null,
|
||||
"left_the_building": null,
|
||||
"entered_the_room": null,
|
||||
"is_now_known_as": null,
|
||||
"This_room_is": null,
|
||||
"Logging_in": "Σύνδεση...",
|
||||
"your_connection_is_unencrypted": "Η σύνδεση είναι μη κρυπτογραφημένη.",
|
||||
"your_connection_is_encrypted": "Η σύνδεση είναι κρυπτογραφημένη.",
|
||||
"your_buddy_closed_the_private_connection": "Η επαφή σας έκλεισε την ιδιωτική σύνδεση.",
|
||||
"start_private": "Ξεκινήστε ιδιωτικά",
|
||||
"close_private": "Κλείστε ιδιωτικά",
|
||||
"your_buddy_is_verificated": "Η επαφή σας επαληθεύτηκε.",
|
||||
"you_have_only_a_subscription_in_one_way": "Έχεις μόνο one-way εγγραφή.",
|
||||
"authentication_query_sent": "Το αίτημα επικύρωσης στάλθηκε.",
|
||||
"your_message_wasnt_send_please_end_your_private_conversation": "Το μήνυμα δεν εστάλη. Παρακαλώ τερματίστε την προσωπική συνομιλία.",
|
||||
"unencrypted_message_received": "Παραλήφθηκε μη κρυπτογραφημένο μήνυμα.",
|
||||
"not_available": "Μη διαθέσιμο.",
|
||||
"no_connection": "Δεν υπάρχει σύνδεση.",
|
||||
"relogin": "Επανασύνδεση",
|
||||
"trying_to_start_private_conversation": "Προσπάθησε να εκκινήσεις μια ιδιωτική συνομιλία!",
|
||||
"Verified": "Επικαιροποιήθηκε",
|
||||
"Unverified": "Ανεπαλήθευτο",
|
||||
"private_conversation_aborted": "Η ιδιωτική συνομιλία ακυρώθηκε!",
|
||||
"your_buddy_closed_the_private_conversation_you_should_do_the_same": "Η επαφή σας έκλεισε την ιδιωτική συνομιλία! Θα πρέπει να κάνετε το ίδιο.",
|
||||
"conversation_is_now_verified": "Η συνομιλία έχει πλέον επαληθευτεί.",
|
||||
"authentication_failed": "Η αυθεντικοποίηση απέτυχε.",
|
||||
"Creating_your_private_key_": "Δημιουργία ιδιωτικού κλειδιού; αυτό θα πάρει λίγη ώρα.",
|
||||
"Authenticating_a_buddy_helps_": "Ο έλεγχος ταυτότητας μιας επαφής βοηθά να διασφαλίσετε ότι το άτομο με το οποίο μιλάτε είναι πραγματικά αυτό που ισχυρίζεται ότι είναι.",
|
||||
"How_do_you_want_to_authenticate_your_buddy": "Πώς θέλετε να πιστοποιήσετε την ταυτότητα __bid_name__ (<b> __ bid_jid __ </ b>);",
|
||||
"Select_method": "Επέλεξε την μέθοδο...",
|
||||
"Manual": "Εγχειρίδιο",
|
||||
"Question": "Ερώτηση",
|
||||
"Secret": "Μυστικό",
|
||||
"To_verify_the_fingerprint_": "Για να επαληθεύσετε το δακτυλικό αποτύπωμα, επικοινωνήστε με την επαφή σας μέσω άλλου αξιόπιστου καναλιού, όπως το τηλέφωνο.",
|
||||
"Your_fingerprint": "Το αποτύπωμα σας",
|
||||
"Buddy_fingerprint": "Αναγνωριστικό επαφής",
|
||||
"Close": "Κλείσε",
|
||||
"Compared": "Σε σύγκριση",
|
||||
"To_authenticate_using_a_question_": "Για να επαληθεύσετε χρησιμοποιώντας ερώτηση, διαλέξτε μια ερώτηση της οποίας η απάντηση θα την γνωρίζετε μόνο εσείς και η επαφή σας.",
|
||||
"Ask": "Ερώτηση",
|
||||
"To_authenticate_pick_a_secret_": "Για να επαληθεύσετε, διαλέξτε ένα μυστικό που θα είναι γνωστό μόνο από σας και την επαφή σας.",
|
||||
"Compare": "Σύγκριση",
|
||||
"Fingerprints": "Δακτυλικά αποτυπώματα",
|
||||
"Authentication": "Αυθεντικοποίηση",
|
||||
"Message": "Μήνυμα",
|
||||
"Add_buddy": "Πρόσθεσε επαφή",
|
||||
"rename_buddy": "Μετονομασία επαφής",
|
||||
"delete_buddy": "Διαγραφή επαφής",
|
||||
"Login": "Είσοδος",
|
||||
"Username": "Όνομα χρήστη",
|
||||
"Password": "Κωδικός",
|
||||
"Cancel": "Ακύρωση",
|
||||
"Connect": "Σύνδεση",
|
||||
"Type_in_the_full_username_": "Πληκτρολογήστε το πλήρες όνομα χρήστη και ένα προαιρετικό ψευδώνυμο.",
|
||||
"Alias": "Ψευδώνυμο",
|
||||
"Add": "Πρόσθεσε",
|
||||
"Subscription_request": "Αίτημα εγγραφής",
|
||||
"You_have_a_request_from": "Έχετε ένα αίτημα από",
|
||||
"Deny": "Άρνηση",
|
||||
"Approve": "Επέτρεψε",
|
||||
"Remove_buddy": "Αφαίρεσε την επαφή",
|
||||
"You_are_about_to_remove_": "Πρόκειται να καταργήσετε την __bid_name__ (<b> __ bid_jid __ </ b>) από τη λίστα επαφών σας. Όλες οι σχετικές συζητήσεις θα κλείσουν.",
|
||||
"Continue_without_chat": "Συνεχίστε χωρίς συνομιλία",
|
||||
"Please_wait": "Παρακαλώ περιμένετε",
|
||||
"Login_failed": "Η είσοδος στη συνομιλία απέτυχε",
|
||||
"Sorry_we_cant_authentikate_": "Ο έλεγχος ταυτότητας απέτυχε με το διακομιστή συνομιλίας. Ίσως ο κωδικός πρόσβασης είναι λάθος;",
|
||||
"Retry": "Πίσω",
|
||||
"clear_history": "Εκκαθάριση ιστορικού",
|
||||
"New_message_from": "Νέο όνομα από__name__",
|
||||
"Should_we_notify_you_": "Θα θέλατε να σας ενημερώνεστε για νέα μηνύματα στο μέλλον;",
|
||||
"Please_accept_": "Παρακαλώ κάντε κλικ στο κουμπί \"Να επιτρέπεται\" στο επάνω μέρος.",
|
||||
"Hide_offline": "Κρύψε τις ανενεργές επαφές",
|
||||
"Show_offline": "Εμφάνισε τις ανενεργές επαφές",
|
||||
"About": "Σχετικά",
|
||||
"dnd": "Μην ενοχλείτε",
|
||||
"Mute": "Σίγαση",
|
||||
"Unmute": "Με ήχο",
|
||||
"Subscription": "Εγγραφή",
|
||||
"both": "μαζί",
|
||||
"Status": "Κατάσταση",
|
||||
"online": "ενεργός",
|
||||
"chat": "συνομιλία",
|
||||
"away": "απών",
|
||||
"xa": "απών για ώρα",
|
||||
"offline": "ανενεργός",
|
||||
"none": "κανείς",
|
||||
"Unknown_instance_tag": "Άγνωστη ετικέτα παρουσίας.",
|
||||
"Not_one_of_our_latest_keys": "Κανένα από τα τελευταία κλειδιά μας.",
|
||||
"Received_an_unreadable_encrypted_message": "Παραλήφθηκε ένα μη κρυπτογραφημένο μήνυμα, αδύνατο να διαβαστεί.",
|
||||
"Online": "Ενεργός",
|
||||
"Chatty": "Ομιλητικός",
|
||||
"Away": "Εκτός",
|
||||
"Extended_away": "Απών για ώρα",
|
||||
"Offline": "Εκτός πρόσβασης",
|
||||
"Friendship_request": "Αίτημα επικοινωνίας",
|
||||
"Confirm": "Επιβεβαιώνω",
|
||||
"Dismiss": "Απορρίπτω",
|
||||
"Remove": "Αφαιρώ",
|
||||
"Online_help": "Διαδικτυακή βοήθεια",
|
||||
"FN": "Πλήρες όνομα",
|
||||
"N": "Όνομα",
|
||||
"FAMILY": "Επίθετο",
|
||||
"GIVEN": "Όνομα",
|
||||
"NICKNAME": "Ψευδώνυμο",
|
||||
"URL": "URL",
|
||||
"ADR": "Διεύθυνση",
|
||||
"STREET": "Διεύθυνση οδού",
|
||||
"EXTADD": "Πλήρη διεύθυνση",
|
||||
"LOCALITY": "Γειτονιά",
|
||||
"REGION": "Περιοχή",
|
||||
"PCODE": "Ταχυδρομικός Κώδικας",
|
||||
"CTRY": "Χώρα",
|
||||
"TEL": "Τηλέφωνο",
|
||||
"NUMBER": "Αριθμός",
|
||||
"EMAIL": "Ηλεκτρονική διεύθυνση",
|
||||
"USERID": "ID χρήστη",
|
||||
"ORG": "Οργανισμός",
|
||||
"ORGNAME": "Όνομα",
|
||||
"ORGUNIT": "Μονάδα",
|
||||
"TITLE": "Τίτλος εργασίας",
|
||||
"ROLE": "Ρόλος",
|
||||
"BDAY": "Γενέθλια",
|
||||
"DESC": "Περιγραφή",
|
||||
"PHOTO": "Φωτογραφία",
|
||||
"send_message": "Αποστολή μηνύματος",
|
||||
"get_info": "Εμφάνιση πληροφοριών",
|
||||
"Settings": "Ρυθμίσεις",
|
||||
"Priority": "Προτεραιότητα",
|
||||
"Save": "Αποθήκευση",
|
||||
"User_settings": "Ρυθμίσεις χρήστη",
|
||||
"A_fingerprint_": "Το αναγνωριστικό χρησιμοποιείτε για να επαληθεύσει αν το άτομο το οποίο μιλάτε είναι αυτός ή αυτή που δηλώνει.",
|
||||
"is": "είναι",
|
||||
"Login_options": "Επιλογές σύνδεσης",
|
||||
"BOSH_url": "BOSH URL",
|
||||
"Domain": "Τομέας",
|
||||
"Resource": "Πόροι",
|
||||
"On_login": "Κατά την είσοδο",
|
||||
"Received_an_unencrypted_message": "Παραλαβή μη κρυπτογραφημένου μήνυματος",
|
||||
"Sorry_your_buddy_doesnt_provide_any_information": "Λυπούμαστε, η επαφή σας δεν παρέχει καμία πληροφορία.",
|
||||
"Info_about": "Πληροφορίες για",
|
||||
"Authentication_aborted": "Ο έλεγχος ταυτότητας απορρίφθηκε",
|
||||
"Authentication_request_received": "Αίτημα ελέγχου ταυτότητας παραλήφθηκε.",
|
||||
"Log_in_without_chat": "Συνδεθείτε χωρίς συνομιλία",
|
||||
"has_come_online": "έχει έρθει σε σύνδεση",
|
||||
"Unknown_sender": "Άγνωστος αποστολέας",
|
||||
"Please_allow_access_to_microphone_and_camera": "Παρακαλώ κάντε κλικ στο κουμπί \"Επιτρέπεται\" στο επάνω μέρος, για να επιτρέψετε την πρόσβαση στο μικρόφωνο και την κάμερα.",
|
||||
"Incoming_call": "Εισερχόμενη κλήση",
|
||||
"from": "από",
|
||||
"Do_you_want_to_accept_the_call_from": "Θέλετε να δεχτείτε την κλήση από",
|
||||
"Reject": "Απορρίπτω",
|
||||
"Accept": "Αποδέχομαι",
|
||||
"hang_up": "κλείνω το τηλέφωνο",
|
||||
"snapshot": "στιγμιότυπο",
|
||||
"mute_my_audio": "σίγαση του ήχου μου",
|
||||
"pause_my_video": "παύση του βίντεο μου",
|
||||
"fullscreen": "Πλήρης οθόνη",
|
||||
"Info": "Πληροφορίες",
|
||||
"Local_IP": "Τοπική IP",
|
||||
"Remote_IP": "Απομακρυσμένη IP",
|
||||
"Local_Fingerprint": "Τοπικό αναγνωριστικό",
|
||||
"Remote_Fingerprint": "Απομακρυσμένο αναγνωριστικό",
|
||||
"Video_call_not_possible": "Δεν είναι δυνατή η κλήση βίντεο. Η επαφή σας δεν υποστηρίζει κλήσεις βίντεο.",
|
||||
"Start_video_call": "Έναρξη βιντεοκλήσης",
|
||||
"Join_chat": "Συμμετοχή σε συνομιλία",
|
||||
"Join": "Συμμετοχή",
|
||||
"Room": "Δωμάτιο",
|
||||
"Nickname": "Ψευδώνυμο",
|
||||
"left_the_building": "__nickname__ έφυγε από το κτίριο",
|
||||
"entered_the_room": "__nickname__ μπήκε στο δωμάτιο",
|
||||
"is_now_known_as": "__oldNickname__ έγινε τώρα ως __newNickname__",
|
||||
"This_room_is": "Αυτό το δωμάτιο είναι",
|
||||
"muc_hidden": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "κρυφό",
|
||||
"description": "δεν μπορεί να βρεθεί μέσω αναζήτησης"
|
||||
},
|
||||
"muc_membersonly": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "μέλη μόνο",
|
||||
"description": "πρέπει να είστε στη λίστα μελών"
|
||||
},
|
||||
"muc_moderated": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "έχει διαχειριστεί",
|
||||
"description": "Μόνο άτομα με \"φωνή\" επιτρέπεται να στέλνουν μηνύματα"
|
||||
},
|
||||
"muc_nonanonymous": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "μη ανώνυμους",
|
||||
"description": "Το jabber id σας εκτίθεται σε όλους τους άλλους συμμετέχοντες"
|
||||
},
|
||||
"muc_open": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "ανοιχτό",
|
||||
"description": "ο καθένας μπορεί να συμμετάσχει"
|
||||
},
|
||||
"muc_passwordprotected": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "προστασία με κωδικό",
|
||||
"description": "θα πρέπει να δώσετε τον σωστό κωδικό πρόσβασης"
|
||||
},
|
||||
"muc_persistent": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "συνεχής",
|
||||
"description": "δεν θα καταστραφεί εάν φύγει ο τελευταίος συμμετέχων"
|
||||
},
|
||||
"muc_public": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "δημόσια",
|
||||
"description": "μπορεί να βρεθεί μέσω αναζήτησης"
|
||||
},
|
||||
"muc_semianonymous": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "ημιανώνυμος",
|
||||
"description": "Το jabber id σας είναι εκτεθειμένο μόνο σε διαχειριστές δωματίων"
|
||||
},
|
||||
"muc_temporary": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "προσωρινά",
|
||||
"description": "θα καταστραφεί εάν φύγει ο τελευταίος"
|
||||
},
|
||||
"muc_unmoderated": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "δεν έχει διαχειριστεί",
|
||||
"description": "όλοι επιτρέπεται να στέλνουν μηνύματα"
|
||||
},
|
||||
"muc_unsecured": {
|
||||
"keyword": null,
|
||||
"description": null
|
||||
"keyword": "Μη ασφαλής",
|
||||
"description": "Δεν χρειάζεται να εισάγετε κωδικό πρόσβασης για να μπείτε"
|
||||
},
|
||||
"Continue": null,
|
||||
"Server": null,
|
||||
"Rooms_are_loaded": null,
|
||||
"Could_load_only": null,
|
||||
"muc_explanation": null,
|
||||
"You_already_joined_this_room": null,
|
||||
"This_room_will_be_closed": null,
|
||||
"Room_not_found_": null,
|
||||
"Loading_room_information": null,
|
||||
"Destroy": null,
|
||||
"Leave": null,
|
||||
"changed_subject_to": null,
|
||||
"muc_removed_kicked": null,
|
||||
"muc_removed_info_kicked": null,
|
||||
"muc_removed_banned": null,
|
||||
"muc_removed_info_banned": null,
|
||||
"muc_removed_affiliation": null,
|
||||
"muc_removed_info_affiliation": null,
|
||||
"muc_removed_membersonly": null,
|
||||
"muc_removed_info_membersonly": null,
|
||||
"muc_removed_shutdown": null,
|
||||
"Reason": null,
|
||||
"message_not_send": null,
|
||||
"message_not_send_item-not-found": null,
|
||||
"message_not_send_forbidden": null,
|
||||
"message_not_send_not-acceptable": null,
|
||||
"This_room_has_been_closed": null,
|
||||
"Room_logging_is_enabled": null,
|
||||
"A_password_is_required": null,
|
||||
"You_are_not_on_the_member_list": null,
|
||||
"You_are_banned_from_this_room": null,
|
||||
"Your_desired_nickname_": null,
|
||||
"The_maximum_number_": null,
|
||||
"This_room_is_locked_": null,
|
||||
"You_are_not_allowed_to_create_": null,
|
||||
"Alert": null,
|
||||
"Call_started": null,
|
||||
"Call_terminated": null,
|
||||
"Carbon_copy": null,
|
||||
"Enable": null,
|
||||
"jingle_reason_busy": null,
|
||||
"jingle_reason_decline": null,
|
||||
"jingle_reason_success": null,
|
||||
"Media_failure": null,
|
||||
"No_local_audio_device": null,
|
||||
"No_local_video_device": null,
|
||||
"Ok": null,
|
||||
"PermissionDeniedError": null,
|
||||
"Use_local_audio_device": null,
|
||||
"Use_local_video_device": null,
|
||||
"is_": null,
|
||||
"You_received_a_message_from_an_unknown_sender_": null,
|
||||
"Your_roster_is_empty_add_": null,
|
||||
"onsmp_explanation_question": null,
|
||||
"onsmp_explanation_secret": null,
|
||||
"from_sender": null,
|
||||
"Verified_private_conversation_started": null,
|
||||
"Unverified_private_conversation_started": null,
|
||||
"Bookmark": null,
|
||||
"Auto-join": null,
|
||||
"Edit_bookmark": null,
|
||||
"Room_logging_is_disabled": null,
|
||||
"Room_is_now_non-anoymous": null,
|
||||
"Room_is_now_semi-anonymous": null,
|
||||
"Do_you_want_to_change_the_default_room_configuration": null,
|
||||
"Default": null,
|
||||
"Change": null,
|
||||
"Send_file": null,
|
||||
"setting-explanation-carbon": null,
|
||||
"setting-explanation-login": null,
|
||||
"setting-explanation-priority": null,
|
||||
"setting-explanation-xmpp": null,
|
||||
"_is_composing": null,
|
||||
"_are_composing": null,
|
||||
"Chat_state_notifications": null,
|
||||
"setting-explanation-chat-state": null,
|
||||
"Share_screen": null,
|
||||
"Incoming_stream": null,
|
||||
"Stream_started": null,
|
||||
"HTTPS_REQUIRED": null,
|
||||
"EXTENSION_UNAVAILABLE": null,
|
||||
"UNKNOWN_ERROR": null,
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null
|
||||
"Continue": "Συνέχισε",
|
||||
"Server": "Διακομιστής",
|
||||
"Rooms_are_loaded": "Το δωμάτιο φορτώνεται",
|
||||
"Could_load_only": "Μπορεί να φορτώσει μόνο __count__ δωμάτια για αυτόματη συμπλήρωση",
|
||||
"muc_explanation": "Παρακαλώ εισαγάγετε το όνομα δωματίου και προαιρετικά ένα ψευδώνυμο και κωδικό πρόσβασης για να συμμετάσχετε σε μια συνομιλία",
|
||||
"You_already_joined_this_room": "Έχετε ήδη ενταχθεί σε αυτό το δωμάτιο",
|
||||
"This_room_will_be_closed": "Αυτό το δωμάτιο θα κλείσει",
|
||||
"Room_not_found_": "Θα δημιουργηθεί ένα νέο δωμάτιο",
|
||||
"Loading_room_information": "Φόρτωση πληροφοριών δωματίου",
|
||||
"Destroy": "Καταστρέφω",
|
||||
"Leave": "Φεύγω",
|
||||
"changed_subject_to": "Ο __nickname__ άλλαξε το δωμάτιο σε \"__subject__\"",
|
||||
"muc_removed_kicked": "Έχετε διωχθεί από το δωμάτιο",
|
||||
"muc_removed_info_kicked": "__nickname__ έχει διωχθεί από το δωμάτιο",
|
||||
"muc_removed_banned": "Έχετε αποκλειστεί από το δωμάτιο",
|
||||
"muc_removed_info_banned": "__nickname__ έχει αποκλειστεί από το δωμάτιο",
|
||||
"muc_removed_affiliation": "Έχετε απομακρυνθεί από το δωμάτιο, λόγω αλλαγής συνεργασίας",
|
||||
"muc_removed_info_affiliation": "__nickname__ έχει αφαιρεθεί από το δωμάτιο, λόγω αλλαγής της συνεργασίας",
|
||||
"muc_removed_membersonly": "Έχετε αφαιρεθεί από το δωμάτιο, επειδή το δωμάτιο έχει αλλάξει μόνο σε μέλη και δεν είστε μέλος",
|
||||
"muc_removed_info_membersonly": "__nickname__ έχει αφαιρεθεί από το δωμάτιο, επειδή το δωμάτιο έχει αλλάξει σε μέλη μόνο και δεν είναι μέλος",
|
||||
"muc_removed_shutdown": "Έχετε αφαιρεθεί από το δωμάτιο, επειδή η υπηρεσία MUC τερματίζεται",
|
||||
"Reason": "Λόγος",
|
||||
"message_not_send": "Το μήνυμά σας δεν στάλθηκε λόγω σφάλματος",
|
||||
"message_not_send_item-not-found": "Το μήνυμά σας δεν στάλθηκε επειδή αυτό το δωμάτιο δεν υπάρχει",
|
||||
"message_not_send_forbidden": "Το μήνυμά σας δεν στάλθηκε επειδή δεν έχετε φωνή σε αυτό το δωμάτιο",
|
||||
"message_not_send_not-acceptable": "Το μήνυμά σας δεν στάλθηκε επειδή δεν είστε κάτοχος αυτού του δωματίου",
|
||||
"message_not_send_resource-unavailable": "Το μήνυμά σας δεν στάλθηκε επειδή ο συνομιλητής σας δεν είναι διαθέσιμος ή συνδεδεμένος",
|
||||
"message_not_send_remote-server-not-found": "Το μήνυμά σας δεν στάλθηκε επειδή απέτυχε η σύνδεση διακομιστή προς διακομιστή",
|
||||
"This_room_has_been_closed": "Αυτό το δωμάτιο έχει κλείσει",
|
||||
"Room_logging_is_enabled": "Η καταγραφή για αυτό το δωμάτιο είναι ενεργοποιημένη",
|
||||
"A_password_is_required": "Κωδικός είναι απαραίτητος",
|
||||
"You_are_not_on_the_member_list": "Δεν είστε στον κατάλογο μελών",
|
||||
"You_are_banned_from_this_room": "Είστε αποκλεισμένοι από αυτό το δωμάτιο",
|
||||
"Your_desired_nickname_": "Το ψευδώνυμό σας που θέλετε είναι ήδη σε χρήση. Επιλέξτε άλλο",
|
||||
"The_maximum_number_": "Σε αυτό το δωμάτιο έφτασε ο μέγιστος αριθμός χρηστών",
|
||||
"This_room_is_locked_": "Αυτό το δωμάτιο είναι κλειδωμένο",
|
||||
"You_are_not_allowed_to_create_": "Δεν επιτρέπεται να δημιουργήσετε ένα δωμάτιο",
|
||||
"Alert": "Συναγερμός",
|
||||
"Call_started": "Η κλήση ξεκίνησε",
|
||||
"Call_terminated": "Η κλήση τερματίστηκε",
|
||||
"Carbon_copy": "Αντίγραφο",
|
||||
"Enable": "Ενεργοποίηση",
|
||||
"jingle_reason_busy": "απασχολημένος",
|
||||
"jingle_reason_decline": "αρνούμαι",
|
||||
"jingle_reason_success": "απάντησε",
|
||||
"Media_failure": "Αποτυχία μέσων",
|
||||
"No_local_audio_device": "Δεν υπάρχει τοπική συσκευή ήχου.",
|
||||
"No_local_video_device": "Δεν υπάρχει τοπική συσκευή βίντεο.",
|
||||
"Ok": "ok",
|
||||
"PermissionDeniedError": "Εσείς ή το πρόγραμμα αποκλειστήκατε από τα δικαιώματα των μέσων.",
|
||||
"Use_local_audio_device": "Χρησιμοποιήστε την τοπική συσκευή ήχου.",
|
||||
"Use_local_video_device": "Χρησιμοποιήστε την τοπική συσκευή βίντεο.",
|
||||
"is_": "είναι __status__",
|
||||
"You_received_a_message_from_an_unknown_sender_": "Λάβατε ένα μήνυμα από έναν άγνωστο αποστολέα (__sender__). Θέλετε να τα εμφανίσετε;",
|
||||
"Your_roster_is_empty_add_": "Το ρόστερ σας είναι άδειο, προσθέστε <a>new contact</a>",
|
||||
"onsmp_explanation_question": "Η επαφή σας προσπαθεί να προσδιορίσει αν μιλάει πραγματικά μαζί σας. Για να επαληθεύσετε την επαφή σας, εισαγάγετε την απάντηση και πατήστε Απάντηση.",
|
||||
"onsmp_explanation_secret": "Η επαφή σας προσπαθεί να προσδιορίσει αν μιλάει πραγματικά μαζί σας. Για να επαληθεύσετε την επαφή σας, εισαγάγετε το μυστικό.",
|
||||
"from_sender": "από __sender__",
|
||||
"Verified_private_conversation_started": "Ξεκίνησε επαληθευμένη ιδιωτική συνομιλία.",
|
||||
"Unverified_private_conversation_started": "Ξεκίνησε μη επαληθευμένη ιδιωτική συνομιλία.",
|
||||
"Bookmark": "Σελιδοδείκτης",
|
||||
"Auto-join": "Αυτόματη σύνδεση",
|
||||
"Edit_bookmark": "Επεξεργασία σελιδοδείκτη",
|
||||
"Room_logging_is_disabled": "Η καταγραφή δωματίου απενεργοποιήθηκε",
|
||||
"Room_is_now_non-anoymous": "Το δωμάτιο είναι πλέον μη ανώνυμο",
|
||||
"Room_is_now_semi-anonymous": "Το δωμάτιο είναι πλέον ημι-ανώνυμο",
|
||||
"Do_you_want_to_change_the_default_room_configuration": "Θέλετε να αλλάξετε την προεπιλεγμένη διαμόρφωση δωματίου;",
|
||||
"Default": "Προεπιλογή",
|
||||
"Change": "Αλλαγή",
|
||||
"Send_file": "Αποστολή αρχείου",
|
||||
"setting-explanation-carbon": "Με ενεργοποιημένο αντίγραφο του XMPP διακομιστή θα στείλει ένα αντίγραφο κάθε εισερχόμενου μηνύματος για εσάς στον πελάτη, ακόμη και αν δεν του απευθύνεστε.",
|
||||
"setting-explanation-login": "Εάν αυτή η επιλογή είναι ενεργοποιημένη, η συνομιλία θα ξεκινήσει κατά τη σύνδεση.",
|
||||
"setting-explanation-priority": "Αν έχετε συνδεθεί πολλές φορές με τον ίδιο λογαριασμό, ο διακομιστής XMPP θα παραδώσει μηνύματα στον πελάτη με την υψηλότερη προτεραιότητα.",
|
||||
"setting-explanation-xmpp": "Αυτές οι επιλογές χρησιμοποιούνται για τη σύνδεση με τον XMPP διακομιστή.",
|
||||
"_is_composing": "αυτός πληκτρολογεί...",
|
||||
"_are_composing": "αυτοί πληκτρολογούν...",
|
||||
"Chat_state_notifications": "Ειδοποιήσεις κατάστασης συνομιλίας",
|
||||
"setting-explanation-chat-state": "Θέλετε να στείλετε και να λάβετε ειδοποιήσεις κατάστασης συνομιλίας, όπως όταν κάποιος ξεκινά ή σταματά να συνθέτει ένα μήνυμα;",
|
||||
"Share_screen": "Μοίρασε την οθόνη",
|
||||
"Incoming_stream": "Εισερχόμενη ροή",
|
||||
"Stream_started": "Η ροή ξεκίνησε",
|
||||
"HTTPS_REQUIRED": "Αυτή η ενέργεια απαιτεί κρυπτογραφημένη σύνδεση.",
|
||||
"EXTENSION_UNAVAILABLE": "Χρειάζεστε μια επέκταση προγράμματος περιήγησης / πρόσθετο.",
|
||||
"UNKNOWN_ERROR": "Παρουσιάστηκε ένα άγνωστο σφάλμα.",
|
||||
"Install_extension": "Παρακαλώ εγκαταστήστε την επέκταση για να χρησιμοποιήσετε την κοινή χρήση οθόνης: ",
|
||||
"Connection_accepted": "Η σύνδεση έγινε αποδεκτή",
|
||||
"Stream_terminated": "Η ροή τερμάτισε",
|
||||
"Close_all": "Κλείσε τα όλα",
|
||||
"Notification": "Ειδοποίηση",
|
||||
"Unreadable_OTR_message": "Παραλείφθηκε μη αναγνώσιμο μήνυμα OTR",
|
||||
"Load_older_messages": "Φορτώστε παλαιότερα μηνύματα",
|
||||
"Message_history": "Ιστορικό μηνυμάτων",
|
||||
"setting-mam-enable": "Εάν ενεργοποιήσετε, μπορείτε να ανακτήσετε αποθηκευμένα μηνύματα από το διακομιστή.",
|
||||
"File_too_large": "Το αρχείο είναι πολύ μεγάλο",
|
||||
"No_proper_file_transfer_method_available": "Δεν υπάρχει διαθέσιμη κατάλληλη μέθοδος μεταφοράς αρχείων",
|
||||
"You_have_to_go_online_": "Θα πρέπει να συνδεθείτε στο διαδίκτυο για να εκτελέσετε αυτήν τη λειτουργία."
|
||||
}
|
||||
}
|
||||
+23
-14
@@ -95,7 +95,7 @@
|
||||
"Remove": "Remove",
|
||||
"Online_help": "Online help",
|
||||
"FN": "Full name",
|
||||
"N": " ",
|
||||
"N": "Name",
|
||||
"FAMILY": "Family name",
|
||||
"GIVEN": "Given name",
|
||||
"NICKNAME": "Nickname",
|
||||
@@ -110,7 +110,7 @@
|
||||
"TEL": "Telephone",
|
||||
"NUMBER": "Number",
|
||||
"EMAIL": "Email",
|
||||
"USERID": " ",
|
||||
"USERID": "User ID",
|
||||
"ORG": "Organization",
|
||||
"ORGNAME": "Name",
|
||||
"ORGUNIT": "Unit",
|
||||
@@ -118,7 +118,7 @@
|
||||
"ROLE": "Role",
|
||||
"BDAY": "Birthday",
|
||||
"DESC": "Description",
|
||||
"PHOTO": " ",
|
||||
"PHOTO": "Photo",
|
||||
"send_message": "Send message",
|
||||
"get_info": "Show information",
|
||||
"Settings": "Settings",
|
||||
@@ -236,10 +236,12 @@
|
||||
"muc_removed_info_membersonly": "__nickname__ has been removed from the room, because the room has been changed to members-only and you are no member",
|
||||
"muc_removed_shutdown": "You have been removed from the room, because the MUC service is being shut down",
|
||||
"Reason": "Reason",
|
||||
"message_not_send": "Your message was not send because of an error",
|
||||
"message_not_send_item-not-found": "Your message was not send because this room does not exist",
|
||||
"message_not_send_forbidden": "Your message was not send because you have no voice in this room",
|
||||
"message_not_send_not-acceptable": "Your message was not send because you are no occupant of this room",
|
||||
"message_not_send": "Your message was not sent because of an error",
|
||||
"message_not_send_item-not-found": "Your message was not sent because this room does not exist",
|
||||
"message_not_send_forbidden": "Your message was not sent because you have no voice in this room",
|
||||
"message_not_send_not-acceptable": "Your message was not sent because you are no occupant of this room",
|
||||
"message_not_send_resource-unavailable": "Your message was not sent because your interlocutor isn't available or connected",
|
||||
"message_not_send_remote-server-not-found": "Your message was not sent because the server-to-server connection failed",
|
||||
"This_room_has_been_closed": "This room has been closed",
|
||||
"Room_logging_is_enabled": "Room logging is enabled",
|
||||
"A_password_is_required": "A password is required",
|
||||
@@ -265,13 +267,13 @@
|
||||
"Use_local_audio_device": "Use local audio device.",
|
||||
"Use_local_video_device": "Use local video device.",
|
||||
"is_": "is __status__",
|
||||
"You_received_a_message_from_an_unknown_sender_": "You received a message from an unknown sender (__sender__) Do you want to display them?",
|
||||
"You_received_a_message_from_an_unknown_sender_": "You received a message from an unknown sender (__sender__). Do you want to display them?",
|
||||
"Your_roster_is_empty_add_": "Your roster is empty, add a <a>new contact</a>",
|
||||
"onsmp_explanation_question": "You contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the answer and click Answer.",
|
||||
"onsmp_explanation_secret": "You contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the secret.",
|
||||
"onsmp_explanation_question": "Your contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the answer and click Answer.",
|
||||
"onsmp_explanation_secret": "Your contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the secret.",
|
||||
"from_sender": "from __sender__",
|
||||
"Verified_private_conversation_started": "Verified Private conversation started.",
|
||||
"Unverified_private_conversation_started": "Unverified Private conversation started.",
|
||||
"Verified_private_conversation_started": "Verified private conversation started.",
|
||||
"Unverified_private_conversation_started": "Unverified private conversation started.",
|
||||
"Bookmark": "Bookmark",
|
||||
"Auto-join": "Auto-join",
|
||||
"Edit_bookmark": "Edit bookmark",
|
||||
@@ -300,6 +302,13 @@
|
||||
"Connection_accepted": "Connection accepted",
|
||||
"Stream_terminated": "Stream terminated",
|
||||
"Close_all": "Close all",
|
||||
"Notification": "Notification"
|
||||
"Notification": "Notification",
|
||||
"Unreadable_OTR_message": "Unreadable OTR message omitted",
|
||||
"Load_older_messages": "Load older messages",
|
||||
"Message_history": "Message history",
|
||||
"setting-mam-enable": "If enabled you are able to retrieve stored messages from the server.",
|
||||
"File_too_large": "File too large",
|
||||
"No_proper_file_transfer_method_available": "No proper file transfer method available",
|
||||
"You_have_to_go_online_": "You have to go online to execute this operation."
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
-1
@@ -240,6 +240,8 @@
|
||||
"message_not_send_item-not-found": "Tu mensaje no fue enviado debido a que esta sala no existe",
|
||||
"message_not_send_forbidden": "Tu mensaje no fue enviado debido a que no tienes voz en esta sala",
|
||||
"message_not_send_not-acceptable": "Tu mensaje no fue enviado debido a que no eres un ocupante de esta sala ",
|
||||
"message_not_send_resource-unavailable": "Tu mensaje no fue enviado porque tu interlocutor no está disponible o conectado",
|
||||
"message_not_send_remote-server-not-found": null,
|
||||
"This_room_has_been_closed": "Esta sala ha sido cerrada",
|
||||
"Room_logging_is_enabled": "Log de sala está habilitado",
|
||||
"A_password_is_required": "Se requiere una contraseña",
|
||||
@@ -299,6 +301,14 @@
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null
|
||||
"Close_all": null,
|
||||
"Notification": null,
|
||||
"Unreadable_OTR_message": null,
|
||||
"Load_older_messages": null,
|
||||
"Message_history": null,
|
||||
"setting-mam-enable": null,
|
||||
"File_too_large": null,
|
||||
"No_proper_file_transfer_method_available": null,
|
||||
"You_have_to_go_online_": null
|
||||
}
|
||||
}
|
||||
+11
-1
@@ -240,6 +240,8 @@
|
||||
"message_not_send_item-not-found": null,
|
||||
"message_not_send_forbidden": null,
|
||||
"message_not_send_not-acceptable": null,
|
||||
"message_not_send_resource-unavailable": null,
|
||||
"message_not_send_remote-server-not-found": null,
|
||||
"This_room_has_been_closed": null,
|
||||
"Room_logging_is_enabled": null,
|
||||
"A_password_is_required": null,
|
||||
@@ -299,6 +301,14 @@
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null
|
||||
"Close_all": null,
|
||||
"Notification": null,
|
||||
"Unreadable_OTR_message": null,
|
||||
"Load_older_messages": null,
|
||||
"Message_history": null,
|
||||
"setting-mam-enable": null,
|
||||
"File_too_large": null,
|
||||
"No_proper_file_transfer_method_available": null,
|
||||
"You_have_to_go_online_": null
|
||||
}
|
||||
}
|
||||
+12
-2
@@ -240,6 +240,8 @@
|
||||
"message_not_send_item-not-found": "Votre message n'a pu être envoyé parce que ce salon n'existe pas",
|
||||
"message_not_send_forbidden": "Votre message n'a pas été envoyé parce que vous n'avez pas le droit de parler dans ce salon",
|
||||
"message_not_send_not-acceptable": "Votre message n'a pas été envoyé car il n'y a personne dans ce salon",
|
||||
"message_not_send_resource-unavailable": "Votre message n'a pas été envoyé parce que votre interlocuteur n'est pas connecté ou disponible",
|
||||
"message_not_send_remote-server-not-found": "Votre message n'a pas été envoyé car la connexion entre serveurs a échouée",
|
||||
"This_room_has_been_closed": "Ce salon a été fermé",
|
||||
"Room_logging_is_enabled": "L'historique du salon est conservé",
|
||||
"A_password_is_required": "Un mot de passe est requis",
|
||||
@@ -267,7 +269,7 @@
|
||||
"is_": "est __status__",
|
||||
"You_received_a_message_from_an_unknown_sender_": "Vous avez reçu un message d'un expéditeur inconnu (__sender__) Voulez-vous les afficher ?",
|
||||
"Your_roster_is_empty_add_": "Votre liste est vide, ajouter <a>Nouveau contact</a>",
|
||||
"onsmp_explanation_question": "Votre contact tente de déterminer si il ou elle parle vraiment à vous. Pour vous authentifier auprès de votre contact, saisissez une réponse et cliquez sur Répondre.",
|
||||
"onsmp_explanation_question": "Votre contact tente de déterminer si il ou elle vous parle vraiment. Pour vous authentifier auprès de votre contact, saisissez une réponse et cliquez sur Répondre.",
|
||||
"onsmp_explanation_secret": "Votre contact tente de déterminer si il ou elle parle vraiment à vous. Pour vous authentifier auprès de votre contact, entrez le mot secret",
|
||||
"from_sender": "de __sender__",
|
||||
"Verified_private_conversation_started": "La conversation privée vérifiée a démarré.",
|
||||
@@ -299,6 +301,14 @@
|
||||
"Install_extension": "Veuillez installer l'extension afin d'utiliser le partage d'écran: ",
|
||||
"Connection_accepted": "Connexion acceptée",
|
||||
"Stream_terminated": "Flux terminé",
|
||||
"Close_all": null
|
||||
"Close_all": "Tout fermer",
|
||||
"Notification": "Notification",
|
||||
"Unreadable_OTR_message": "Message OTR illisible omis",
|
||||
"Load_older_messages": "Charger des messages plus anciens",
|
||||
"Message_history": null,
|
||||
"setting-mam-enable": null,
|
||||
"File_too_large": "Fichier trop grand",
|
||||
"No_proper_file_transfer_method_available": "Pas de méthode de transfert de fichier disponible.",
|
||||
"You_have_to_go_online_": "Vous devez être connecté pour exécuter cette opération"
|
||||
}
|
||||
}
|
||||
+11
-1
@@ -240,6 +240,8 @@
|
||||
"message_not_send_item-not-found": null,
|
||||
"message_not_send_forbidden": null,
|
||||
"message_not_send_not-acceptable": null,
|
||||
"message_not_send_resource-unavailable": null,
|
||||
"message_not_send_remote-server-not-found": null,
|
||||
"This_room_has_been_closed": null,
|
||||
"Room_logging_is_enabled": null,
|
||||
"A_password_is_required": null,
|
||||
@@ -299,6 +301,14 @@
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null
|
||||
"Close_all": null,
|
||||
"Notification": null,
|
||||
"Unreadable_OTR_message": null,
|
||||
"Load_older_messages": null,
|
||||
"Message_history": null,
|
||||
"setting-mam-enable": null,
|
||||
"File_too_large": null,
|
||||
"No_proper_file_transfer_method_available": null,
|
||||
"You_have_to_go_online_": null
|
||||
}
|
||||
}
|
||||
+11
-1
@@ -240,6 +240,8 @@
|
||||
"message_not_send_item-not-found": null,
|
||||
"message_not_send_forbidden": null,
|
||||
"message_not_send_not-acceptable": null,
|
||||
"message_not_send_resource-unavailable": null,
|
||||
"message_not_send_remote-server-not-found": null,
|
||||
"This_room_has_been_closed": null,
|
||||
"Room_logging_is_enabled": null,
|
||||
"A_password_is_required": null,
|
||||
@@ -299,6 +301,14 @@
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null
|
||||
"Close_all": null,
|
||||
"Notification": null,
|
||||
"Unreadable_OTR_message": null,
|
||||
"Load_older_messages": null,
|
||||
"Message_history": null,
|
||||
"setting-mam-enable": null,
|
||||
"File_too_large": null,
|
||||
"No_proper_file_transfer_method_available": null,
|
||||
"You_have_to_go_online_": null
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -240,6 +240,7 @@
|
||||
"message_not_send_item-not-found": null,
|
||||
"message_not_send_forbidden": null,
|
||||
"message_not_send_not-acceptable": null,
|
||||
"message_not_send_resource-unavailable": null,
|
||||
"This_room_has_been_closed": null,
|
||||
"Room_logging_is_enabled": null,
|
||||
"A_password_is_required": null,
|
||||
@@ -299,6 +300,8 @@
|
||||
"Install_extension": null,
|
||||
"Connection_accepted": null,
|
||||
"Stream_terminated": null,
|
||||
"Close_all": null
|
||||
"Close_all": null,
|
||||
"Notification": null,
|
||||
"Unreadable_OTR_message": null
|
||||
}
|
||||
}
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário