pax_global_header00006660000000000000000000000064136233067060014520gustar00rootroot0000000000000052 comment=a767d1982c51b53e4617145fad4979160fd225a3 TbSync-2.11/000077500000000000000000000000001362330670600126455ustar00rootroot00000000000000TbSync-2.11/.github/000077500000000000000000000000001362330670600142055ustar00rootroot00000000000000TbSync-2.11/.github/issue_template.md000066400000000000000000000007441362330670600175570ustar00rootroot00000000000000## Your environment TbSync version: Thunderbird version: [ ] Yes, I have installed the latest available (beta) version from https://github.com/jobisoft/TbSync/releases and my issue is not yet fixed, I can still reproduce it. ## Expected behavior ... ## Actual behavior ... ## Steps to reproduce ... To help resolving your issue, enable debug logging (TbSync Account Manager -> Help) and send me the debug.log via e-mail (use the title of your issue as subject of the email). TbSync-2.11/.gitignore000066400000000000000000000000061362330670600146310ustar00rootroot00000000000000*.xpi TbSync-2.11/CONTRIBUTORS.md000066400000000000000000000003701362330670600151240ustar00rootroot00000000000000## Creator * John Bieling ## Contributors * John Bieling * Jan Dagefoerde * Nam Ldmpub ## Translators * John Bieling (de, en-US) * Wanderlei Hüttel (pt-BR) * Alessandro Menti (it) * Óvári (hu) * Alexey Sinitsyn (ru) * Daniel Wróblewski (pl) TbSync-2.11/LICENSE000066400000000000000000000405251362330670600136600ustar00rootroot00000000000000Mozilla Public License Version 2.0 ================================== 1. Definitions -------------- 1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. 1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution. 1.3. "Contribution" means Covered Software of a particular Contributor. 1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. 1.5. "Incompatible With Secondary Licenses" means (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. 1.6. "Executable Form" means any form of the work other than Source Code Form. 1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" means this document. 1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. 1.10. "Modifications" means any of the following: (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or (b) any new file in Source Code Form that contains any Covered Software. 1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. 1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. 1.13. "Source Code Form" means the form of the work preferred for making modifications. 1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. License Grants and Conditions -------------------------------- 2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. 2.2. Effective Date The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. 2.3. Limitations on Grant Scope The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: (a) for any code that a Contributor has removed from Covered Software; or (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or (c) under Patent Claims infringed by Covered Software in the absence of its Contributions. This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). 2.5. Representation Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. 2.6. Fair Use This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. 2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. 3. Responsibilities ------------------- 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form. 3.2. Distribution of Executable Form If You distribute Covered Software in Executable Form then: (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). 3.4. Notices You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. 4. Inability to Comply Due to Statute or Regulation --------------------------------------------------- If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Termination -------------- 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. ************************************************************************ * * * 6. Disclaimer of Warranty * * ------------------------- * * * * Covered Software is provided under this License on an "as is" * * basis, without warranty of any kind, either expressed, implied, or * * statutory, including, without limitation, warranties that the * * Covered Software is free of defects, merchantable, fit for a * * particular purpose or non-infringing. The entire risk as to the * * quality and performance of the Covered Software is with You. * * Should any Covered Software prove defective in any respect, You * * (not any Contributor) assume the cost of any necessary servicing, * * repair, or correction. This disclaimer of warranty constitutes an * * essential part of this License. No use of any Covered Software is * * authorized under this License except under this disclaimer. * * * ************************************************************************ ************************************************************************ * * * 7. Limitation of Liability * * -------------------------- * * * * Under no circumstances and under no legal theory, whether tort * * (including negligence), contract, or otherwise, shall any * * Contributor, or anyone who distributes Covered Software as * * permitted above, be liable to You for any direct, indirect, * * special, incidental, or consequential damages of any character * * including, without limitation, damages for lost profits, loss of * * goodwill, work stoppage, computer failure or malfunction, or any * * and all other commercial damages or losses, even if such party * * shall have been informed of the possibility of such damages. This * * limitation of liability shall not apply to liability for death or * * personal injury resulting from such party's negligence to the * * extent applicable law prohibits such limitation. Some * * jurisdictions do not allow the exclusion or limitation of * * incidental or consequential damages, so this exclusion and * * limitation may not apply to You. * * * ************************************************************************ 8. Litigation ------------- Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. 9. Miscellaneous ---------------- This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. 10. Versions of the License --------------------------- 10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. 10.2. Effect of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. Exhibit A - Source Code Form License Notice ------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. Exhibit B - "Incompatible With Secondary Licenses" Notice --------------------------------------------------------- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. TbSync-2.11/Makebeta000066400000000000000000000030521362330670600143010ustar00rootroot00000000000000#!/bin/bash # This file is part of TbSync. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # $1 link to base web server : https://tbsync.jobisoft.de/beta # $2 local path of base web server : /var/www/jobisoft.de/tbsync/beta # $3 name of XPI : TbSync.xpi git clean -df git checkout -- . git pull version=$(cat manifest.json | jq -r .version) updatefile=update-tbsync.json sed -i "s/%VERSION%/$version/g" "beta-release-channel-update.json" sed -i "s|%LINK%|$1/$3|g" "beta-release-channel-update.json" sed -i "s/apiVersion: \"/apiVersion: \"Beta /g" "content/tbsync.jsm" sed -i "s|https://addons.thunderbird.net/addon/dav-4-tbsync/|$1/DAV-4-TbSync.xpi|g" "content/modules/providers.js" sed -i "s|https://addons.thunderbird.net/addon/eas-4-tbsync/|$1/EAS-4-TbSync.xpi|g" "content/modules/providers.js" echo "Releasing version $version via beta release channel (will include updateURL)" sed -i "s|\"name\": \"TbSync\",|\"name\": \"TbSync [Beta Release Channel]\",|g" "manifest.json" sed -i "s|\"gecko\": {|\"gecko\": {\n \"update_url\": \"$1/$updatefile\",|g" "manifest.json" cp beta-release-channel-update.json $2/$updatefile rm -f $3 rm -f $3.tar.gz zip -r $3 content _locales skin chrome.manifest manifest.json bootstrap.js LICENSE CONTRIBUTORS.md tar cfvz $3.tar.gz content _locales skin chrome.manifest manifest.json bootstrap.js LICENSE CONTRIBUTORS.md cp $3 $2/$3 cp $3.tar.gz $2/$3.tar.gz TbSync-2.11/Makefile.bat000066400000000000000000000014121362330670600150500ustar00rootroot00000000000000@echo off REM This file is part of TbSync. REM REM This Source Code Form is subject to the terms of the Mozilla Public REM License, v. 2.0. If a copy of the MPL was not distributed with this REM file, You can obtain one at http://mozilla.org/MPL/2.0/. del TbSync-beta.xpi "C:\Program Files\7-Zip\7zG.exe" a -tzip TbSync-beta.xpi content _locales skin chrome.manifest manifest.json LICENSE README.md bootstrap.js CONTRIBUTORS.md REM Copy sources to doc repository rd /s /q ..\Provider-4-TbSync\docs\sources mkdir ..\Provider-4-TbSync\docs\sources copy content\OverlayManager.jsm ..\Provider-4-TbSync\docs\sources\ Xcopy /E /I content\passwordPrompt ..\Provider-4-TbSync\docs\sources\passwordPrompt\ Xcopy /E /I content\modules ..\Provider-4-TbSync\docs\sources\modules\ TbSync-2.11/README.md000066400000000000000000000156071362330670600141350ustar00rootroot00000000000000# TbSync 1. [Introduction](https://github.com/jobisoft/TbSync#introduction) 2. [Where is this going?](https://github.com/jobisoft/TbSync#where-is-this-going) 3. [External data sources](https://github.com/jobisoft/TbSync#external-data-sources) 4. [Icon sources and attributions](https://github.com/jobisoft/TbSync#icon-sources-and-attributions) ## Introduction [TbSync](https://addons.thunderbird.net/addon/tbsync/) is a central user interface to manage cloud accounts and to synchronize their contact, task and calendar information with [Thunderbird](https://www.thunderbird.net/). Its main objective is to simplify the setup process for such accounts. The following providers (protocols) are currently supported: * CalDAV & CardDAV, via [DAV-4-TbSync](https://github.com/jobisoft/DAV-4-TbSync) [[compatibility list (DAV)](https://github.com/jobisoft/DAV-4-TbSync/wiki/Compatibility-list-(DAV))] * Exchange ActiveSync (EAS v2.5 & v14.0), via [EAS-4-TbSync](https://github.com/jobisoft/EAS-4-TbSync) [[compatibility list (EAS)](https://github.com/jobisoft/EAS-4-TbSync/wiki/Compatibility-list-(EAS))] Further details can be found in the [wiki](https://github.com/jobisoft/TbSync/wiki) of the TbSync project and in the [how-to-get-started guide](https://github.com/jobisoft/TbSync/wiki/How-to-get-started). If you like TbSync and want to support its development, please consider a donation. [![](https://www.paypalobjects.com/en_US/DK/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/johnbieling) ## Want to add or fix a localization? To help translating this project, please visit [crowdin.com](https://crowdin.com/profile/jobisoft), where the localizations are managed. If you want to add a new language, just contact me and I will set it up. Here are some general information regarding translations: * [Localization content best practices](https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices) * [Summary table of quotation marks per language](https://en.wikipedia.org/wiki/Quotation_mark#Summary_table) * [Transvision](https://transvision.mozfr.org/) provides translations for various languages * by Thunderbird supported [locale codes](https://searchfox.org/comm-central/source/mail/locales/all-locales) ## Where is this going? I started to work on TbSync, because we needed ActiveSync (EAS) support in Thunderbird. Soon after, I realized that the current situation for sync accounts is very confusing in terms of user experience: There was no central place to set up sync accounts. The same DAV account had to be setup in lightning and again in the sogo-connector or in CardBook. EWS accounts are setup differently again and for google we need 3 different add-ons for contacts, calendars and tasks. With TbSync I want to unify that: A central manager to setup sync accounts (DAV, EAS, EWS, Google, ...) and get contacts, tasks and calendars. I knew that I will not be able to re-create and maintain all the different providers for TbSync by myself. I thus created a TbSync Provider API, which allows other add-ons to hook into TbSync and re-use most of the glue code. I am in contact with Thunderbird staff and we are trying to get TbSync integrated directly into Thunderbird. No ETA yet. Future plans: * cooperate with [CardBook](https://github.com/jobisoft/TbSync/issues/105), so it does not matter, if the user wants to use the standard Thunderbird address book or the cardbook address book. * add support for Google * add support for [EteSync](https://www.etesync.com/) * support the [EWS community](https://github.com/ExchangeCalendar/exchangecalendar), which is interested in turning their add-on into a provider for TbSync. All this requires funding. If you like TbSync and want to support its development, please consider a donation. ## Adding support for other sync protocolls by creating a TbSync provider add-on All the information needed, to build a new provider add-on for TbSync and thus extending its sync capabilities, can be found here: ``` https://tbsync.readthedocs.org ``` ## Icon sources and attributions #### WTFPL * [spinner.gif] by [Yannick Croissant](http://www.ajaxload.info/) #### CC0-1.0 * [add16.png] by [Jean Victor Balin](https://openclipart.org/detail/16950/add) * [del16.png] by [Jean Victor Balin](https://openclipart.org/detail/16982/cross) * [tick16.png] by [Jean Victor Balin](https://openclipart.org/detail/17056/tick) * [sync16.png] by [Willleam](https://openclipart.org/detail/287463/circular-arrow-blue) * [slider-on.png] by [John Bieling](https://github.com/jobisoft/TbSync/blob/master/skin/src/LICENSE) * [slider-off.png] by [John Bieling](https://github.com/jobisoft/TbSync/blob/master/skin/src/LICENSE) #### CC-BY 3.0 * [contacts16.png] by [Yusuke Kamiyamane](https://www.iconfinder.com/icons/25910/) * [todo16.png] by [Yusuke Kamiyamane](https://www.iconfinder.com/icons/45913/) * [error16.png] by [Yusuke Kamiyamane](https://www.iconfinder.com/icons/46013/exclamation_frame_icon) * [connect16.png] by [Yusuke Kamiyamane](https://www.iconfinder.com/icons/58341/connect_plug_icon) * [info16.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/64363/info_rhombus_icon) * [warning16.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/36026/) * [calendar16.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/35805/) * [calendar/contacts16_shared.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/64490/network_share_icon) * [trash16.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/35727/bin_empty_metal_icon) * [acl_rw.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/36322/pencil_icon) * [acl_ro.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/36324/delete_pencil_icon) * [provider16.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/64634) * [report_send.png] based on work by FatCow Web Hosting [#1](https://www.iconfinder.com/icons/36365/) and [#2](https://www.iconfinder.com/icons/93180) * [report_open.png] by [FatCow Web Hosting](https://www.iconfinder.com/icons/36373) * [lock24.png] by [Paomedia](https://www.iconfinder.com/icons/285646/lock_icon) * [tbsync.png] by [Paomedia](https://www.iconfinder.com/icons/299097) * [settings32.png] by [Paomedia](https://www.iconfinder.com/icons/299098/cogs_icon) * [update32.png] by [Google](https://www.iconfinder.com/icons/352158/) * [group32.png] by [Dumitriu Robert](https://www.iconfinder.com/icons/3289557/clan_group_partners_peers_people_icon) * [catman32.png] based on 'Venn Diagram' by [WARPAINT Media Inc., CA](https://thenounproject.com/search/?q=three%20circles&i=31898#) from Noun Project ([info](https://github.com/jobisoft/CategoryManager/tree/master/sendtocategory/skin/catman)) #### Apache Software License 2.0 * [disabled16.png] by [Google](https://github.com/google/material-design-icons/blob/master/notification/1x_web/ic_do_not_disturb_alt_black_18dp.png) #### GPL * [help32.png] by [WooThemes](https://www.iconfinder.com/icons/58495/button_help_white_icon) TbSync-2.11/UPDATE68.md000066400000000000000000000027411362330670600143330ustar00rootroot00000000000000# Update instructions for Thunderbird 68 TbSync has been mostly rewritten for Thunderbird 68 (the next major release being due in a few weeks). To ensure a seamless transition from Thunderbird 60 to Thunderbird 68, I recommend to do the following **before** upgrading to Thunderbird 68: * synchronize all your TbSync accounts * disable all your TbSync accounts After the upgrade to Thunderbird 68 has completed, your TbSync accounts can be enabled again. ## How to disable TbSync accounts Each TbSync account can be disabled by unchecking the box shown in the following image: ![](https://user-images.githubusercontent.com/5830621/63053657-9a2c6d80-bee2-11e9-9019-7035830a873b.png)] ## Why is this necessary ? It could happen, that after the upgrade your synchronized address books and calendars still exists in Thunderbird and can be used as before, but are no longer connected to your servers. If you make local changes, they will never make it to your servers. So these changes will be lost. That is why I ask to disable all accounts during the upgrade from Thunderbird 60 to Thunderbird 68. After re-enabling your accounts in Thunderbird 68, they will start a clean sync which ensures a proper connection between Thunderbird and your servers. ## System-specific tips On Arch Linux and derivatives, you can add a `pacman` hook [like this one](https://gist.github.com/MayeulC/400adbfba72effc29fca4d8666fc4571) to print a reminder and cancel the thunderbird upgrade when it becomes available. TbSync-2.11/_locales/000077500000000000000000000000001362330670600144265ustar00rootroot00000000000000TbSync-2.11/_locales/Readme.txt000066400000000000000000000003521362330670600163640ustar00rootroot00000000000000Want to add or fix a localization? To help translating this project, please visit https://crowdin.com/profile/jobisoft where the localizations are managed. If you want to add a new language, just contact me and I will set it up. TbSync-2.11/_locales/bg/000077500000000000000000000000001362330670600150165ustar00rootroot00000000000000TbSync-2.11/_locales/bg/messages.json000066400000000000000000000004141362330670600175170ustar00rootroot00000000000000{ "extensionDescription": { "message": "TbSync е добавка за управление на регистрации и синхронизиране със сървъри на вашите контакти, задачи и събития с Thunderbird." } }TbSync-2.11/_locales/bg/tbSync.dtd000066400000000000000000000213011362330670600167520ustar00rootroot00000000000000 TbSync-2.11/_locales/bg/tbSync.properties000066400000000000000000000141501362330670600203770ustar00rootroot00000000000000info.idle=Празен ход info.error=Грешка google.translate.code=bg prompt.DeleteAccount=Сигурни ли сте, че искате да изтриете регистрация ##accountName##? prompt.Disable=Сигурни ли сте, че искате да изключите тази регистрация? Всички местни промени, които още не са синхронизирани, ще се изпарят! prompt.Unsubscribe=Сигурни ли сте, че за този ресурс не желаете да сте повече абониран? Всички местни промени, които още не са синхронизирани, ще се изпарят! prompt.Erase=Сигурни ли сте, че тази регистрация от непознат доставчик искате да я премахнете от списъка с регистрации? accountacctions.delete=Изтриване на регистрация "##accountname##" accountacctions.sync=Синхронизиране на регистрация "##accountname##" accountacctions.enable=Включване на регистрация "##accountname##" и свързване със сървъра accountacctions.disable=Изключване на регистрация "##accountname##" manager.tryagain=Нов опит за връзка със сървъра manager.connecting=Осъществяване на връзка manager.resource=Ресурс manager.status=Статус manager.help=Помощ addressbook.searchall=Претърсване на всички адресни указатели addressbook.searchthis=Претърсване на този адресен указател addressbook.searchgal=Претърсване на този адресен указател и на глобалния указател на сървъра (##replace.1##) installProvider.header=Доставчик "##replace.1##" за TbSync не е инсталиран. supportwizard.provider=Доставчик: ##replace.1## OopsMessage=Ужас! TbSync не можа да се зареди! UnableToTraceError=Не е възможно да се изследва грешката, тъй като не всички действия са протоколирани. Желаете ли да започне подробно протоколиране на събитията, за да може грешката да се анализира и отстрани? RestartThunderbirdAndTryAgain=Режимът за подробно протоколиране на събитията е включен. Рестартирайте Thunderbird и опитайте да отворите отново TbSync. HelpFixStartupError=За отстраняване на тази грешка може да изпратите доклад на разработчика. Желаете ли да ви покажем доклада за изпращане? NoDebugLog=Липсват съществени протоколирани съобщения. Включете режима за подробно протоколиране, рестартирайте Thunderbird и повторете всички стъпки за да се стигне отново до грешка. status.apiError=API Грешка при програмирането status.disabled=Регистрацията и синхронизацията са изключени. status.syncing=Синхронизиране status.skipped=Не се поддържа, пропуснато status.aborted=Не е синхронизиран status.pending=Чакане за синхронизация status.modified=Местни промени syncstate.syncing=Започване на синхронизацията syncstate.preparing=Подготовка на следващия ресурс за синхронизация syncstate.done=Подготовка на следващия ресурс за синхронизация syncstate.accountdone=Синхронизирането на регистрацията приключи syncstate.passwordprompt=Подкана за въвеждане на информация за регистрация syncstate.oauthprompt=OAuth 2.0 удостоверяване status.success=Добре status.notargets=Синхронизирането прекъсна, тъй като на компютъра ви не можеха да се създадат нови ресурси. status.nolightning=Добавката Lightning не е инсталирана, календарът е неизползваем. status.notsyncronized=Регистрацията трябва да бъде синхронизира. status.foldererror=Поне при един ресурс се появи грешка при синхронизирането. Проверете протокола със събията за подробности. status.no-folders-found-on-server=На сървъра не бяха намерени ресурси. status.security=Грешка при осъществяването на защитена връзка. Използвате ли собственоръчно направен сертификат или сертификат, на който Thunderbird няма доверие? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-untrusted-certificates%3F status.network=Не можеше да се установи връзка със сървъра (##replace.1##). status.JavaScriptError=Javascript грешка! Проверете протокола със събитията за подробности. status.OAuthNetworkError=Не можах да се свържа с OAuth 2.0 сървъра. status.OAuthHttpError=Удостоверяването по OAuth 2.0 не стана (HTTP грешка ##replace.1##). status.OAuthAbortError=Процесът на OAuth 2.0 удоствоверяване беше прекъснат от потребителя. status.OAuthServerError= OAuth 2.0 сървъра отвърна с ##replace.1## target.orphaned=Прекъсната връзка TbSync-2.11/_locales/de/000077500000000000000000000000001362330670600150165ustar00rootroot00000000000000TbSync-2.11/_locales/de/messages.json000066400000000000000000000003371362330670600175230ustar00rootroot00000000000000{ "extensionDescription": { "message": "TbSync ist eine zentrale Benutzeroberfläche zur Verwaltung von Cloud-Konten und zur Synchronisierung ihrer Kontakt-, Aufgaben- und Kalenderinformationen mit Thunderbird." } }TbSync-2.11/_locales/de/tbSync.dtd000066400000000000000000000140031362330670600167530ustar00rootroot00000000000000 TbSync-2.11/_locales/de/tbSync.properties000066400000000000000000000103631362330670600204010ustar00rootroot00000000000000info.idle=Leerlauf info.error=Fehler google.translate.code=de prompt.DeleteAccount=Sind Sie sicher, dass Sie das Konto ##accountName## löschen möchten? prompt.Disable=Sind Sie sicher, dass Sie dieses Konto deaktivieren möchten? Alle lokalen Veränderungen, die noch nicht synchronisiert wurden, gehen dabei verloren! prompt.Unsubscribe=Sind Sie sicher, dass Sie dieses Element nicht länger abonnieren möchten? Alle lokalen Veränderungen, die noch nicht synchronisiert wurden, gehen dabei verloren! prompt.Erase=Sind Sie sicher, dass Sie dieses Konto eines unbekannten Providers aus der Kontoliste entfernen möchten? accountacctions.delete=Konto "##accountname##" löschen accountacctions.sync=Konto "##accountname##" synchronisieren accountacctions.enable=Konto "##accountname##" aktivieren & Server kontaktieren accountacctions.disable=Konto "##accountname##" deaktivieren manager.tryagain=Erneut versuchen mit dem Server zu verbinden manager.connecting=Verbindung wird hergestellt manager.resource=Ressource manager.status=Status manager.help=Hilfe addressbook.searchall=Alle Adressbücher durchsuchen addressbook.searchthis=Dieses Adressbuch durchsuchen addressbook.searchgal=Dieses Adressbuch und das globale Serververzeichnis durchsuchen (##replace.1##) installProvider.header=Provider "##replace.1##" für TbSync ist noch nicht installiert. supportwizard.provider=Provider: ##replace.1## OopsMessage=Oops! TbSync konnte nicht starten! UnableToTraceError=Es ist im Augenblick nicht möglich, diesen Fehler zu untersuchen, da der TbSync Debug-Modus nicht aktiviert ist. Soll der Debug-Modus aktiviert werden, damit dieser Fehler untersucht und behoben werden kann? RestartThunderbirdAndTryAgain=Der TbSync Debug-Modus wurde aktiviert, bitte starten Sie Thunderbird neu und versuchen Sie dann noch einmal TbSync zu öffnen. HelpFixStartupError=Um diesen Fehler zu beheben, können Sie einen Fehlerbericht an den Entwickler von TbSync schicken. Soll der Fehlerbericht jetzt angefertigt werden? NoDebugLog=Es liegen keine aussagekräftigen Debug-Meldungen vor. Bitte aktivieren Sie den Debug-Modus, starten Thunderbird neu und wiederholen dann alle Schritte um das fehlerhafte Verhalten zu reproduzieren. status.apiError=API Implementierungsfehler status.disabled=Konto ist deaktiviert, Synchronisation ist ausgeschaltet. status.syncing=Synchronisierung status.skipped=Nicht unterstützt status.aborted=Nicht synchronisiert status.pending=Warten auf Synchronisation status.modified=Lokale Änderungen syncstate.syncing=Initiiere Synchronisation syncstate.preparing=Bereite das nächste Element für die Synchronisation vor syncstate.done=Bereite das nächste Element für die Synchronisation vor syncstate.accountdone=Kontosynchronisation abgeschlossen syncstate.passwordprompt=Aufforderung zur Eingabe der Anmeldeinformationen syncstate.oauthprompt=OAuth 2.0 Authentifizierung status.success=Ok status.notargets=Synchronisation abgebrochen da die Elemente zum Synchronisieren nicht erstellt werden konnten. status.nolightning=Lightning Add-On nicht installiert, Kalender nicht nutzbar. status.notsyncronized=Konto muss synchronisiert werden. status.foldererror=Bei mindestens einer Resource trat ein Synchronisationsfehler auf. Bitte prüfen sie das Ereignisprotokoll für weitere Details. status.no-folders-found-on-server=Auf dem Server wurden keine Resourcen gefunden. status.security=Fehler beim Aufbau einer sicherern Verbindung. Benutzen Sie eventuell ein selbst signiertes Zertifikat oder ein andersartiges nicht vertrauenswürdiges Zertifikat welches nicht in Thunderbird importiert ist? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-untrusted-certificates%3F status.network=Verbindung zum Server fehlgeschlagen (##replace.1##). status.JavaScriptError=Javascript Fehler! Bitte prüfen Sie das Ereignisprotokoll für weitere Details. status.OAuthNetworkError=Verbindung zum OAuth 2.0 Authentifizierungsserver nicht möglich. status.OAuthHttpError=OAuth 2.0 Authentifizierungsprozess fehlgeschlagen (HTTP Error ##replace.1##). status.OAuthAbortError=OAuth 2.0 Authentifizierungsprozess vom Benutzer abgebrochen. status.OAuthServerError= OAuth 2.0 Authentifizierungsserver meldet: ##replace.1## target.orphaned=Verbindung getrennt TbSync-2.11/_locales/en-US/000077500000000000000000000000001362330670600153555ustar00rootroot00000000000000TbSync-2.11/_locales/en-US/messages.json000066400000000000000000000003031362330670600200530ustar00rootroot00000000000000{ "extensionDescription": { "message": "TbSync is a central user interface to manage cloud accounts and to synchronize their contact, task and calendar information with Thunderbird." } } TbSync-2.11/_locales/en-US/tbSync.dtd000066400000000000000000000125661362330670600173260ustar00rootroot00000000000000 TbSync-2.11/_locales/en-US/tbSync.properties000066400000000000000000000072521362330670600207430ustar00rootroot00000000000000info.idle=Idle info.error=Error google.translate.code=en prompt.DeleteAccount=Are you sure you want to delete account ##accountName##? prompt.Disable=Are you sure you want to disable this account? All local modifications, which have not been synced yet, will be lost! prompt.Unsubscribe=Are you sure you want to unsubscribe this item? All local modifications, which have not been synced yet, will be lost! prompt.Erase=Are you sure you want to remove this account of an unknown provider from the accounts lists? accountacctions.delete=Delete account “##accountname##” accountacctions.sync=Synchronize account “##accountname##” accountacctions.enable=Enable account “##accountname##” & try to connect to server accountacctions.disable=Disable account “##accountname##” manager.tryagain=Try again to connect server manager.connecting=Connecting to server manager.resource=Resource manager.status=Status manager.help=Help addressbook.searchall=Search all address books addressbook.searchthis=Search this address book addressbook.searchgal=Search this address book and the global directory (##replace.1##) installProvider.header=Provider “##replace.1##” for TbSync is not yet installed. supportwizard.provider=Provider: ##replace.1## OopsMessage=Oops! TbSync was not able to start! UnableToTraceError=It is not possible to trace this error, because debug log is currently not enabled. Do you want to enable debug log now, to help fix this error? RestartThunderbirdAndTryAgain=TbSync debug log has been enabled, please restart Thunderbird and again try to open TbSync. HelpFixStartupError=To help fix this error, you could send a debug log to the TbSync developer. Prepare that email now? NoDebugLog=Could not find any useful debug messages. Please activate debug mode, restart Thunderbird and repeat all the steps needed to trigger the erroneous behavior. status.apiError=API implementation error status.disabled=Account is not enabled, synchronization is disabled. status.syncing=Synchronizing status.skipped=Not yet supported, skipped status.aborted=Not synchronized status.pending=Waiting to be synchronized status.modified=Local modifications syncstate.syncing=Initialize synchronization syncstate.preparing=Preparing next item for synchronization syncstate.done=Preparing next item for synchronization syncstate.accountdone=Finished account syncstate.passwordprompt=Prompting for credentials syncstate.oauthprompt=OAuth 2.0 authentication status.success=OK status.notargets=Aborting synchronization, because sync targets could not be created. status.nolightning=Lightning add-on not installed, calendars are not supported. status.notsyncronized=Account needs to be synchronized, at least one item is out of sync. status.foldererror=At least one resource encountered a synchronization error. Please check the event log for more details. status.no-folders-found-on-server=Could not find any resources on the server. status.security=Could not establish a secure connection. Are you using a self-signed or otherwise untrusted certificate without importing it into Thunderbird? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-untrusted-certificates%3F status.network=Could not connect to server (##replace.1##). status.JavaScriptError=Javascript Error! Please check the event log for more details. status.OAuthNetworkError=Could not connect to OAuth 2.0 authentication server. status.OAuthHttpError=OAuth 2.0 authentication process failed (HTTP error ##replace.1##). status.OAuthAbortError=OAuth 2.0 authentication process aborted by user. status.OAuthServerError= OAuth 2.0 authentication server returned: ##replace.1## target.orphaned=Disconnected TbSync-2.11/_locales/fr/000077500000000000000000000000001362330670600150355ustar00rootroot00000000000000TbSync-2.11/_locales/fr/messages.json000066400000000000000000000003251362330670600175370ustar00rootroot00000000000000{ "extensionDescription": { "message": "TbSync est une interface permettant de gérer de manière centralisée ses comptes cloud et d'en synchroniser les contacts, tâches et agendas avec Thunderbird." } }TbSync-2.11/_locales/fr/tbSync.dtd000066400000000000000000000144261362330670600170030ustar00rootroot00000000000000 TbSync-2.11/_locales/fr/tbSync.properties000066400000000000000000000106561362330670600204250ustar00rootroot00000000000000info.idle=Inactif info.error=Erreur google.translate.code=fr prompt.DeleteAccount=Êtes-vous certain de vouloir supprimer le compte ##accountName##? prompt.Disable=Êtes-vous certain de vouloir désactiver ce compte? Toutes les modifications locales non encore synchronisées seront perdues! prompt.Unsubscribe=Êtes-vous certain de vouloir supprimer l'abonnement à cet élément? Toutes les modifications locales non encore synchronisées seront perdues! prompt.Erase=Êtes-vous certain de vouloir supprimer ce compte d'un provider inconnu de la liste des comptes? accountacctions.delete=Supprimer le compte "##accountname##" accountacctions.sync=Synchroniser le compte "##accountname##" accountacctions.enable=Activer le compte "##accountname##" et tenter de se connecter au serveur accountacctions.disable=Désactiver le compte "##accountname##" manager.tryagain=Essayer à nouveau de se connecter au serveur manager.connecting=Connexion au serveur en cours manager.resource=Ressource manager.status=Statut manager.help=Aide addressbook.searchall=Rechercher dans tous les carnets d'adresses addressbook.searchthis=Rechercher dans ce carnet d'adresse addressbook.searchgal=Recherche dans ce carnet d'adresse et dans l'annuaire global (##replace.1##) installProvider.header=Le provider TbSync "##replace.1##" n'est pas encore installé. supportwizard.provider=Provider: ##replace.1## OopsMessage=Oups! TbSync n'a pas réussi à démarrer! UnableToTraceError=Il n'est pas possible de localiser cette erreur, parce que le journal de débogage n'est actuellement pas activé. Désirez-vous activer le journal de débogage maintenant, afin d'aider à résoudre cette erreur? RestartThunderbirdAndTryAgain=Le journal de débogage de TbSync a été activé. Veuillez redémarrer Thunderbird et essayer à nouveau d'ouvrir TbSync. HelpFixStartupError=Pour aider à la résolution de cette erreur, vous pourriez envoyer le journal de débogage au développeur de TbSync. Voulez-vous qu'on prépare un courriel à cette fin? NoDebugLog=Il n'a pas été possible de trouver un message de débogage utile. Merci d'activer le mode de débogage, de redémarrer Thunderbird puis de répéter les étapes qui ont menées au comportement anormal du programme. status.apiError=Erreur dans l'implémentation de l'API status.disabled=Le compte n'est pas activé, la synchronisation est désactivée. status.syncing=Synchronisation en cours status.skipped=Non encore supporté, ignoré. status.aborted=Non synchronisé status.pending=En attente de synchronisation status.modified=Modifications locales présentes syncstate.syncing=Initialisation de la synchronisation syncstate.preparing=Préparation de la synchronisation du prochain élément syncstate.done=Préparation de la synchronisation du prochain élément syncstate.accountdone=Synchronisation du compte finie syncstate.passwordprompt=Demande d'insertion du mot de passe syncstate.oauthprompt=Authentification OAuth 2.0 status.success=OK status.notargets=Annulation de la synchronisation en cours: il est impossibble de créer les destinations de synchronisation. status.nolightning=Le module complémentaire Lightning nest pas installé, les calendriers ne seront donc pas supportés. status.notsyncronized=Le compte doit être synchronisé: au moins un éléments est désynchronisé. status.foldererror=Au moins une ressource a rencontré une erreur de synchronisation. Veuillez lire le journal de débogage pour plus de détails. status.no-folders-found-on-server=Impossible de trouver les ressources sur le serveur. status.security=Impossible d'établir une connexion sécurisée. Votre serveur utilise-t-il un certificat auto-signé ou non certifié de confiance, que vous n'avez pas importé dans Thunderbird? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-non-rusted-certificats%3F status.network=Impossibile de se connecter au serveur (##replace.1##). status.JavaScriptError=Erreur Javascript! Veuillez lire le journal de débogage pour plus de détails. status.OAuthNetworkError=Impossible de se connecter au serveur d'authentification OAuth 2.0. status.OAuthHttpError=Le processus d'authentification OAuth 2.0 a échoué (erreur HTTP ##replace.1##). status.OAuthAbortError=Processus d'authentification OAuth 2.0 abandonné par l'utilisateur. status.OAuthServerError= Le serveur d'authentification OAuth 2.0 a donné le retour suivant: ##replace.1## target.orphaned=Connexion rompue TbSync-2.11/_locales/hu/000077500000000000000000000000001362330670600150425ustar00rootroot00000000000000TbSync-2.11/_locales/hu/messages.json000066400000000000000000000003561362330670600175500ustar00rootroot00000000000000{ "extensionDescription": { "message": "A Thunderbird-összehangolás egy központi felhasználói felület kezeli a felhőfiókokat, és összehangolja névjegyzékait, feladatait és naptáradatait a Thunderbird programmal." } }TbSync-2.11/_locales/hu/tbSync.dtd000066400000000000000000000136541362330670600170120ustar00rootroot00000000000000 TbSync-2.11/_locales/hu/tbSync.properties000066400000000000000000000104471362330670600204300ustar00rootroot00000000000000info.idle=Tétlen info.error=Hiba google.translate.code=hu prompt.DeleteAccount=Biztos benne, hogy törölni szeretne fiók ##accountName##? prompt.Disable=Biztosan letiltja ezt a fiókot? Minden helyi módosítás, amely még nincs összehangolva, elveszik! prompt.Unsubscribe=Biztosan le szeretné iratkozni ezt az elemet? Minden helyi módosítás, amely még nincs összehangolva, elveszik! prompt.Erase=Biztosan eltávolít egy ismeretlen szolgáltató fiókját a fiókok listáiról? accountacctions.delete=A(z) „##accountname##” fiók törlése accountacctions.sync=A(z) „##accountname##” fiók összehangolása accountacctions.enable=A(z) „##accountname##” fiók engedélyezze és próbálja meg csatlakozni a kiszolgálóhoz accountacctions.disable=A(z) „##accountname##” fiók letiltása manager.tryagain=Próbálkozzon újra a kiszolgálóhoz való csatlakozással manager.connecting=Kiszolgáló összekapcsolása manager.resource=Mappa manager.status=Állapot manager.help=Segítség addressbook.searchall=Keresése az összes névjegyzékben addressbook.searchthis=Keresése csak ezt a címjegyzékben addressbook.searchgal=Keresése ezt a névjegyzékben és a globális könyvtárban (##replace.1##) installProvider.header=A(z) „##replace.1##” szolgáltató a Thunderbird-összehangoláshoz még nincs telepítve. supportwizard.provider=Szolgáltató: ##replace.1## OopsMessage=Hoppá, valami hiba történt a Thunderbird-összehangolás indításakor. UnableToTraceError=Nem lehet nyomon követni ezt a hibát, mert a hibakeresési napló jelenleg nincs engedélyezve. Szeretné engedélyezni a hibakeresési naplót, hogy segítsen javítani a hibát? RestartThunderbirdAndTryAgain=A Thunderbird-összehangolás hibakeresési napló engedélyezve van, kérjük, indítsa újra a Thunderbird programot, és próbálkozzon újra a Thunderbird-összehangolás megnyitásával. HelpFixStartupError=A hiba javításához hibakeresési naplót küldhet a Thunderbird-összehangolás fejlesztőnek. Készüljön fel most arra az e-mailre? NoDebugLog=Nem találtak hasznos hibaelhárító üzeneteket. Engedélyezze a hibakeresési módot, indítsa újra a Thunderbird programot, és ismételje meg a hibás viselkedést elindító lépéseket. status.apiError=API végrehajtási hiba status.disabled=A fiók nem engedélyezett, az összehangolás le van tiltva. status.syncing=Összehangolás folyamatban status.skipped=Még nem támogatott, kimarad status.aborted=Nincs összehangolva status.pending=Várakozás összehangolásra status.modified=Helyi módosítások syncstate.syncing=Összehangolás előkészítése syncstate.preparing=Az összehangolás következő elem előkészítése syncstate.done=Az összehangolás következő elem előkészítése syncstate.accountdone=Fiók befejezve syncstate.passwordprompt=Hitelesítő adatok megadásának kérése syncstate.oauthprompt=OAuth 2.0 hitelesítés status.success=Rendben status.notargets=A összehangolás abbahagyása, mert a összehangolási célokat nem lehetett létrehozni. status.nolightning=A Lightning-t kiegészítő nincs telepítve, a naptárak nem támogatottak. status.notsyncronized=A fiókját összehangolni kell. Legalább egy elem összehangolatlan. status.foldererror=Legalább egy erőforrás szinkronizálási hibát észlelt. További részletekért nézze meg az eseménynaplót. status.no-folders-found-on-server=A kiszolgálón nem található erőforrás. status.security=Biztonsági kapcsolat létrehozása nem sikerült. Ön aláírta vagy egyébként nem megbízható tanúsítványt importálta a Thunderbirdbe? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-untrusted-certificates%3F status.network=Nem tudott csatlakozni a kiszolgálóhoz (##replace.1##). status.JavaScriptError=Javascript hiba! További részletekért nézze meg az eseménynaplót. status.OAuthNetworkError=Nem sikerült csatlakozni az OAuth 2.0 hitelesítési kiszolgálóhoz. status.OAuthHttpError=Az OAuth 2.0 hitelesítési folyamat sikertelen (HTTP hibakód: ##replace.1##). status.OAuthAbortError=Az OAuth 2.0 hitelesítési folyamatot a felhasználó megszakította. status.OAuthServerError= Az OAuth 2.0 hitelesítési kiszolgáló visszatért: ##replace.1## target.orphaned=A kapcsolat megszakadt TbSync-2.11/_locales/it/000077500000000000000000000000001362330670600150425ustar00rootroot00000000000000TbSync-2.11/_locales/it/messages.json000066400000000000000000000003331362330670600175430ustar00rootroot00000000000000{ "extensionDescription": { "message": "TbSync è un'interfaccia utente che consente di gestire in modo centralizzato account cloud e di sincronizzare i loro contatti, attività e calendari con Thunderbird." } }TbSync-2.11/_locales/it/tbSync.dtd000066400000000000000000000136201362330670600170030ustar00rootroot00000000000000 TbSync-2.11/_locales/it/tbSync.properties000066400000000000000000000100701362330670600204200ustar00rootroot00000000000000info.idle=Inattivo info.error=Errore google.translate.code=it prompt.DeleteAccount=Eliminare l'account ##accountName##? prompt.Disable=Disabilitare quest'account? Tutte le modifiche locali non ancora sincronizzate andranno perse! prompt.Unsubscribe=Annullare la sottoscrizione a questo elemento? Tutte le modifiche locali non ancora sincronizzate andranno perse! prompt.Erase=Rimuovere quest'account di un provider sconosciuto dall'elenco degli account? accountacctions.delete=Elimina l'account "##accountname##" accountacctions.sync=Sincronizza l'account "##accountname##" accountacctions.enable=Abilita l'account "##accountname##" e tenta la connessione al server accountacctions.disable=Disabilita l'account "##accountname##" manager.tryagain=Riprova a collegarti al server manager.connecting=Connessione al server in corso manager.resource=Cartella manager.status=Stato manager.help=Aiuto addressbook.searchall=Cerca in tutte le rubriche addressbook.searchthis=Cerca in questa rubrica addressbook.searchgal=Cerca in questa rubrica e nella directory globale (##replace.1##) installProvider.header=Il provider "##replace.1##" per TbSync non è ancora installato. supportwizard.provider=Provider: ##replace.1## OopsMessage=Oops! TbSync non è stato in grado di avviarsi! UnableToTraceError=Non è possibile localizzare quest'errore perché i log di debug non sono attualmente abilitati. Abilitare ora il log di debug per contribuire a correggere quest'errore? RestartThunderbirdAndTryAgain=Il log di debug di TbSync è stato abilitato, riavviare Thunderbird e riprovare ad aprire TbSync. HelpFixStartupError=Per contribuire a correggere quest'errore potresti inviare un log di debug allo sviluppatore di TbSync. Preparare tale messaggio di posta elettronica ora? NoDebugLog=Non è stato possibile trovare alcun messaggio di debug utile. Attiva la modalità di debug, riavvia Thunderbird e ripeti tutti i passaggi richiesti per scatenare il comportamento errato. status.apiError=Errore di implementazione dell'API status.disabled=L'account non è abilitato, la sincronizzazione è disabilitata. status.syncing=Sincronizzazione in corso status.skipped=Non ancora supportato, omesso status.aborted=Non sincronizzato status.pending=In attesa di sincronizzazione status.modified=Modifiche locali presenti syncstate.syncing=Inizializzazione sincronizzazione in corso syncstate.preparing=Preparazione prossimo elemento per la sincronizzazione in corso syncstate.done=Preparazione prossimo elemento per la sincronizzazione in corso syncstate.accountdone=Sincronizzazione account completata syncstate.passwordprompt=Richiesta di inserire le credenziali syncstate.oauthprompt=Autenticazione OAuth 2.0 status.success=OK status.notargets=Interruzione sincronizzazione in corso: non è possibile creare le destinazioni sincronizzazione. status.nolightning=Componente aggiuntivo Lightning non installato, i calendari non sono supportati. status.notsyncronized=L'account deve essere sincronizzato, almeno un elemento non è sincronizzato. status.foldererror=Almeno una risorsa ha riscontrato un errore di sincronizzazione. Si prega di controllare il registro eventi per maggiori dettagli. status.no-folders-found-on-server=Impossibile trovare risorse sul server. status.security=Impossibile stabilire una connessione sicura. Si sta utilizzando un certificato autofirmato o non affidabile senza averlo importato in Thunderbird? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-untrusted-certificates%3F status.network=Impossibile collegarsi al server (##replace.1##). status.JavaScriptError=Errore Javascript! Si prega di controllare il registro eventi per maggiori dettagli. status.OAuthNetworkError=Impossibile connettersi al server di autenticazione OAuth 2.0. status.OAuthHttpError=Processo di autenticazione OAuth 2.0 non riuscito (errore HTTP ##replace.1##). status.OAuthAbortError=Processo di autenticazione OAuth 2.0 interrotto dall'utente. status.OAuthServerError= Il server di autenticazione OAuth 2.0 ha restituito: ##replace.1## target.orphaned=Connessione disconnessa TbSync-2.11/_locales/pl/000077500000000000000000000000001362330670600150415ustar00rootroot00000000000000TbSync-2.11/_locales/pl/messages.json000066400000000000000000000003201362330670600175360ustar00rootroot00000000000000{ "extensionDescription": { "message": "TbSync to centralny interfejs użytkownika do zarządzania kontami w chmurze i synchronizowania ich danych kontaktowych, zadań i kalendarza z Thunderbird." } }TbSync-2.11/_locales/pl/tbSync.dtd000066400000000000000000000134011362330670600167770ustar00rootroot00000000000000 TbSync-2.11/_locales/pl/tbSync.properties000066400000000000000000000101151362330670600204170ustar00rootroot00000000000000info.idle=Bezczynny info.error=Błąd google.translate.code=pl prompt.DeleteAccount=Czy na pewno chcesz usunąć konto ##accountName##? prompt.Disable=Czy na pewno chcesz wyłączyć to konto? Wszystkie lokalne modyfikacje, które nie zostały jeszcze zsynchronizowane, zostaną utracone! prompt.Unsubscribe=Czy na pewno chcesz anulować subskrypcję tego elementu? Wszystkie lokalne modyfikacje, które nie zostały jeszcze zsynchronizowane, zostaną utracone! prompt.Erase=Czy jesteś pewien, że chcesz usunąć to konto nieznanego dostawcy z list kont? accountacctions.delete=Usuń konto “##accountname##” accountacctions.sync=Synchronizuj konto “##accountname##” accountacctions.enable=Włącz konto “##accountname##” i spróbuj połączyć się z serwerem accountacctions.disable=Wyłącz konto “##accountname##” manager.tryagain=Spróbuj ponownie połączyć z serwerem manager.connecting=Łączenie z serwerem manager.resource=Zasób manager.status=Status manager.help=Pomoc addressbook.searchall=Wyszukuj we wszystkich książkach adresowych addressbook.searchthis=Wyszukuj w tej książce adresowej addressbook.searchgal=Wyszukuj w tej książce adresowej i w katalogu globalnym (##replace.1##) installProvider.header=Dostawca “##replace.1##” dla TbSync nie jest jeszcze zainstalowany. supportwizard.provider=Dostawca: ##replace.1## OopsMessage=Ups! TbSync nie mógł się uruchomić! UnableToTraceError=Nie można prześledzić tego błędu, ponieważ dziennik debugowania nie jest obecnie włączony. Czy chcesz teraz włączyć dziennik debugowania, aby pomóc naprawić ten błąd? RestartThunderbirdAndTryAgain=Dziennik debugowania TbSync został włączony, zrestartuj Thunderbirda i ponownie spróbuj otworzyć TbSync. HelpFixStartupError=Aby naprawić ten błąd, możesz wysłać dziennik debugowania do programisty TbSync. Przygotować ten e-mail teraz? NoDebugLog=Nie można znaleźć żadnych przydatnych wiadomości debugowania. Aktywuj tryb debugowania, uruchom ponownie Thunderbirda i powtórz wszystkie kroki potrzebne do wywołania błędnego zachowania. status.apiError=Błąd implementacji API status.disabled=Konto nie jest włączone, synchronizacja jest wyłączona. status.syncing=Synchronizuję status.skipped=Jeszcze nie wspierane, pominięto status.aborted=Nie zsynchronizowane status.pending=Oczekiwanie na synchronizację status.modified=Zmiany lokalne syncstate.syncing=Zainicjuj synchronizację syncstate.preparing=Przygotowuję następny element do synchronizacji syncstate.done=Przygotowuję następny element do synchronizacji syncstate.accountdone=Konto gotowe syncstate.passwordprompt=Monitowanie o dane logowania syncstate.oauthprompt=Uwierzytelnianie OAuth 2.0 status.success=OK status.notargets=Przerywanie synchronizacji, ponieważ nie można utworzyć celów synchronizacji. status.nolightning=Dodatek Lightning nie zainstalowany, kalendarze nie są obsługiwane. status.notsyncronized=Konto musi zostać zsynchronizowane, co najmniej jeden element nie jest zsynchronizowany. status.foldererror=Przynajmniej jeden zasób napotkał błąd synchronizacji. Sprawdź dziennik zdarzeń, aby uzyskać więcej informacji. status.no-folders-found-on-server=Nie można znaleźć żadnych zasobów na serwerze. status.security=Nie można ustanowić bezpiecznego połączenia. Czy używasz certyfikatu self-signed lub innego niezaufanego certyfikatu bez importowania go do Thunderbirda? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-untrusted-certificates%3F status.network=Nie można połączyć z serwerem (##replace.1##). status.JavaScriptError=Błąd Javascript! Sprawdź dziennik zdarzeń, aby uzyskać więcej informacji. status.OAuthNetworkError=Nie można połączyć się z serwerem uwierzytelniania OAuth 2.0. status.OAuthHttpError=Proces uwierzytelniania OAuth 2.0 nie powiódł się (błąd HTTP ##replace.1##). status.OAuthAbortError=Proces uwierzytelniania OAuth 2.0 przerwany przez użytkownika. status.OAuthServerError= Serwer uwierzytelniania OAuth 2.0 zwrócił: ##replace.1## target.orphaned=Rozłączony TbSync-2.11/_locales/pt_BR/000077500000000000000000000000001362330670600154345ustar00rootroot00000000000000TbSync-2.11/_locales/pt_BR/messages.json000066400000000000000000000003061362330670600201350ustar00rootroot00000000000000{ "extensionDescription": { "message": "O TbSync é uma central para gerenciar contas em nuvem e para sincronizar as informações de contatos, tarefas e calendários com o Thunderbird." } }TbSync-2.11/_locales/pt_BR/tbSync.dtd000066400000000000000000000134171362330670600174010ustar00rootroot00000000000000 TbSync-2.11/_locales/pt_BR/tbSync.properties000066400000000000000000000101521362330670600210130ustar00rootroot00000000000000info.idle=Ocioso info.error=Erro google.translate.code=pt prompt.DeleteAccount=Tem certeza de que deseja excluir a conta ##accountName##? prompt.Disable=Tem certeza de que deseja desativar esta conta? Todas as modificações locais, que ainda não foram sincronizadas, serão perdidas! prompt.Unsubscribe=Tem certeza de que deseja cancelar a inscrição deste item? Todas as modificações locais, que ainda não foram sincronizadas, serão perdidas! prompt.Erase=Tem certeza de que deseja remover essa conta de um provedor desconhecido das listas de contas? accountacctions.delete=Excluir conta "##accountname##" accountacctions.sync=Sincronizar conta "##accountname##" accountacctions.enable=Ativar conta "##accountname##" e tentar conectar-se ao servidor accountacctions.disable=Desativar conta "##accountname##" manager.tryagain=Tentar conectar no servidor novamente manager.connecting=Conectando ao servidor manager.resource=Recurso manager.status=Status manager.help=Ajuda addressbook.searchall=Pesquisar todos os catálogos de endereços addressbook.searchthis=Pesquisar este catálogo de endereços addressbook.searchgal=Pesquisar este catálogo de endereços e o diretório global (##replace.1##) installProvider.header=O provedor "##replace.1##" para o TbSync ainda não está instalado. supportwizard.provider=Provedor: ##replace.1## OopsMessage=Erro! O TbSync não pode iniciar! UnableToTraceError=Não é possível rastrear este erro, porque o log de depuração não está habilitado no momento. Deseja ativar o log de depuração agora para ajudar a corrigir esse erro? RestartThunderbirdAndTryAgain=O log de depuração do TbSync foi ativado, reinicie o Thunderbird e tente abrir novamente o TbSync. HelpFixStartupError=Para ajudar a corrigir esse erro, você poderia enviar um log de depuração para o desenvolvedor do TbSync. Enviar esse email agora? NoDebugLog=Não foi possível encontrar nenhuma mensagem de depuração útil. Por favor, ative o modo de depuração, reinicie o Thunderbird e repita todas as etapas necessárias para acionar o comportamento errado. status.apiError=Erro de implementação da API status.disabled=A conta não está ativada, a sincronização está desativada. status.syncing=Sincronizando status.skipped=Ainda não suportado, ignorado status.aborted=Não sincronizado status.pending=Aguardando para ser sincronizado status.modified=Modificações locais syncstate.syncing=Inicializar sincronização syncstate.preparing=Preparando o próximo item para sincronização syncstate.done=Preparando o próximo item para sincronização syncstate.accountdone=Conta finalizada syncstate.passwordprompt=Solicitação para inserir credenciais syncstate.oauthprompt=Autenticação OAuth 2.0 status.success=OK status.notargets=Anulando a sincronização, porque os destinos de sincronização não puderam ser criados. status.nolightning=O complemento Lightning não está instalado, os calendários não serão suportados. status.notsyncronized=Conta precisa ser sincronizada, pelo menos, um item não está sincronizado. status.foldererror=Pelo menos um recurso encontrou um erro de sincronização. Por favor, verifique o log de eventos para mais detalhes. status.no-folders-found-on-server=Não foi possível encontrar nenhum recurso no servidor. status.security=Não foi possível estabelecer uma conexão segura. Você está usando um certificado autoassinado ou não confiável sem importá-lo para o Thunderbird? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-untrusted-certificates%3F status.network=Não foi possível conectar-se ao servidor (##replace.1##). status.JavaScriptError=Erro de Javascript! Por favor, verifique o log de eventos para mais detalhes. status.OAuthNetworkError=Não foi possível conectar ao servidor de autenticação OAuth 2.0. status.OAuthHttpError=O processo de autenticação OAuth 2.0 falhou (HTTP error ##replace.1##). status.OAuthAbortError=Processo de autenticação OAuth 2.0 abortado pelo usuário. status.OAuthServerError= O servidor de autenticação OAuth 2.0 retornou: ##replace.1## target.orphaned=Conexão desconectada TbSync-2.11/_locales/ru/000077500000000000000000000000001362330670600150545ustar00rootroot00000000000000TbSync-2.11/_locales/ru/messages.json000066400000000000000000000005201362330670600175530ustar00rootroot00000000000000{ "extensionDescription": { "message": "TbSync - это центральный пользовательский интерфейс для управления облачными учетными записями и синхронизации данных контактов, задач и календаря с Thunderbird." } }TbSync-2.11/_locales/ru/tbSync.dtd000066400000000000000000000204151362330670600170150ustar00rootroot00000000000000 TbSync-2.11/_locales/ru/tbSync.properties000066400000000000000000000132751362330670600204440ustar00rootroot00000000000000info.idle=Ожидание info.error=Ошибка google.translate.code=ru prompt.DeleteAccount=Вы уверены, что хотите удалить аккаунт ##accountName##? prompt.Disable=Вы действительно хотите запретить этот аккаунт? Все локальные изменения, которые еще не синхронизированы, будут потеряны! prompt.Unsubscribe=Вы действительно хотите отменить подписку на этот элемент? Все локальные изменения, которые еще не синхронизированы, будут потеряны! prompt.Erase=Вы действительно хотите удалить этот аккаунт неизвестного провайдера из списка аккаунтов? accountacctions.delete=Удалить аккаунт “##accountname##” accountacctions.sync=Синхронизировать аккаунт “##accountname##” accountacctions.enable=Разрешить аккаунт “##accountname##” и подключиться к серверу accountacctions.disable=Запретить аккаунт “##accountname##” manager.tryagain=Повторить подсоединение к серверу manager.connecting=Подсоединиться к серверу manager.resource=Папка manager.status=Статус manager.help=помощь addressbook.searchall=Поиск по всем адресным книгам addressbook.searchthis=Поиск в этой адресной книге addressbook.searchgal=Поиск в этой адресной книге и в глобальном каталоге (##replace.1##) installProvider.header=Провайдер “##replace.1##” для TbSync не установлен. supportwizard.provider=Провайдер: ##replace.1## OopsMessage=Неудача! TbSync не смог запуститься! UnableToTraceError=Невозможно проследить эту ошибку, поскольку журнал отладки в данный момент не включен. Вы хотите включить журнал отладки сейчас, чтобы исправить эту ошибку? RestartThunderbirdAndTryAgain=Журнал отладки TbSync включен, перезапустите Thunderbird и снова попытайтесь открыть TbSync. HelpFixStartupError=Чтобы исправить эту ошибку, вы можете отправить журнал отладки разработчику TbSync. Подготовьте это письмо сейчас? NoDebugLog=Не удалось найти пригодные отладочные сообщения. Включите режим отладки, перезапустите Thunderbird и повторите все шаги, необходимые для запуска ошибочного поведения. status.apiError=Ошибка реализации API status.disabled=Аккаунт не включен, синхронизация отключена. status.syncing=Синхронизация status.skipped=Пока не поддерживается, пропущено status.aborted=Не синхронизировано status.pending=Ожидание пока синхронизируется status.modified=Локальные изменения syncstate.syncing=Инициализация синхронизации syncstate.preparing=Подготовка следующего элемента для синхронизации syncstate.done=Подготовка следующего элемента для синхронизации syncstate.accountdone=Завершенный аккаунт syncstate.passwordprompt=Запрос на ввод учетных данных status.success=Готово status.notargets=Отмена синхронизации, поскольку цели синхронизации не могут быть созданы. status.nolightning=Lightning Add-On не установлен, календари не поддерживаются. status.notsyncronized=Аккаунт должен быть синхронизирован, по крайней мере один элемент не синхронизирован. status.foldererror=По крайней мере один ресурс обнаружил ошибку синхронизации. Пожалуйста, проверьте журнал событий для более подробной информации. status.no-folders-found-on-server=Не удалось найти какие-либо ресурсы на сервере. status.security=Не удалось установить безопасное соединение. Вы используете самоподписанный или ненадежный сертификат без импорта его в Thunderbird? (##replace.1##) helplink.security=https://github.com/jobisoft/TbSync/wiki/How-to-use-TbSync-with-self-signed-or-otherwise-untrusted-certificates%3F status.network=Не удалось подключиться к серверу (##replace.1##). status.JavaScriptError=Ошибка JavaScript! Пожалуйста, проверьте журнал событий для более подробной информации. status.OAuthNetworkError=Could not connect to OAuth 2.0 authentication server. status.OAuthHttpError=OAuth 2.0 authentication process failed (HTTP error ##replace.1##). status.OAuthAbortError=OAuth 2.0 authentication process aborted by user. status.OAuthServerError= OAuth 2.0 authentication server returned: ##replace.1## target.orphaned=Соединение разорвано TbSync-2.11/beta-release-channel-update.json000066400000000000000000000004711362330670600207610ustar00rootroot00000000000000{ "addons": { "tbsync@jobisoft.de": { "updates": [ { "version": "%VERSION%", "update_info_url": "https://github.com/jobisoft/TbSync/releases", "update_link": "%LINK%", "applications": { "gecko": { "strict_min_version": "68.0" } } } ] } } }TbSync-2.11/bootstrap.js000066400000000000000000000070001362330670600152150ustar00rootroot00000000000000/* * This file is part of TbSync. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); var { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); function install(data, reason) { } function uninstall(data, reason) { } function startup(data, reason) { // possible reasons: APP_STARTUP, ADDON_ENABLE, ADDON_INSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE. // set default prefs let defaults = Services.prefs.getDefaultBranch("extensions.tbsync."); defaults.setBoolPref("debug.testoptions", false); defaults.setBoolPref("log.toconsole", false); defaults.setIntPref("log.userdatalevel", 0); //0 - off 1 - userdata only on errors 2 - including full userdata, 3 - extra infos // Check if the main window has finished loading let windows = Services.wm.getEnumerator("mail:3pane"); while (windows.hasMoreElements()) { let domWindow = windows.getNext().QueryInterface(Ci.nsIDOMWindow); WindowListener.loadIntoWindow(domWindow); } // Wait for any new windows to open. Services.wm.addListener(WindowListener); //DO NOT ADD ANYTHING HERE! } function shutdown(data, reason) { //possible reasons: APP_SHUTDOWN, ADDON_DISABLE, ADDON_UNINSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE var { TbSync } = ChromeUtils.import("chrome://tbsync/content/tbsync.jsm"); let windows = Services.wm.getEnumerator("mail:3pane"); while (windows.hasMoreElements()) { let domWindow = windows.getNext().QueryInterface(Ci.nsIDOMWindow); WindowListener.unloadFromWindow(domWindow); } // Stop listening for any new windows to open. Services.wm.removeListener(WindowListener); TbSync.enabled = false; //unload TbSync module TbSync.dump("TbSync shutdown","Unloading TbSync modules."); TbSync.unload().then(function() { Cu.unload("chrome://tbsync/content/tbsync.jsm"); Cu.unload("chrome://tbsync/content/HttpRequest.jsm"); Cu.unload("chrome://tbsync/content/OverlayManager.jsm"); // HACK WARNING: // - the Addon Manager does not properly clear all addon related caches on update; // - in order to fully update images and locales, their caches need clearing here Services.obs.notifyObservers(null, "chrome-flush-caches", null); }); } var WindowListener = { async loadIntoWindow(window) { if (window.document.readyState != "complete") { // Make sure the window load has completed. await new Promise(resolve => { window.addEventListener("load", resolve, { once: true }); }); } // Check if the opened window is the one we want to modify. if (window.document.documentElement.getAttribute("windowtype") === "mail:3pane") { // the main window has loaded, continue with init var { TbSync } = ChromeUtils.import("chrome://tbsync/content/tbsync.jsm"); if (!TbSync.enabled) TbSync.load(window); } }, unloadFromWindow(window) { }, // nsIWindowMediatorListener functions onOpenWindow(xulWindow) { // A new window has opened. let domWindow = xulWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow); // The domWindow.document.documentElement.getAttribute("windowtype") is not set before the load, so we cannot check it here this.loadIntoWindow(domWindow); }, onCloseWindow(xulWindow) { }, onWindowTitleChange(xulWindow, newTitle) { }, }; TbSync-2.11/chrome.manifest000066400000000000000000000006201362330670600156500ustar00rootroot00000000000000content tbsync content/ skin tbsync classic/1.0 skin/ locale tbsync bg _locales/bg/ locale tbsync de _locales/de/ locale tbsync en-US _locales/en-US/ locale tbsync fr _locales/fr/ locale tbsync hu _locales/hu/ locale tbsync it _locales/it/ locale tbsync pl _locales/pl/ locale tbsync pt-BR _locales/pt_BR/ locale tbsync ru _locales/ru/ TbSync-2.11/content/000077500000000000000000000000001362330670600143175ustar00rootroot00000000000000TbSync-2.11/content/HttpRequest.jsm000066400000000000000000000765371362330670600173440ustar00rootroot00000000000000/* * This file is part of TbSync, contributed by John Bieling. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Limitations: * ============ * - no real event support (cannot add eventlisteners) * - send only supports string body * - onprogress not supported * - readyState 2 & 3 not supported * * Note about HttpRequest.open(method, url, async, username, password): * ============================================================================ * If an Authorization header is specified, HttpRequest will use the * given header. * * If no Authorization header is specified, but a username, HttpRequest * will delegate the authentication process to nsIHttpChannel. If a password is * specified as well, it will be used for authentication. If no password is * specified, it will call the passwordCallback(username, realm, host) callback to * request a password for the given username, host and realm send back from * the server (in the WWW-Authenticate header). * */ "use strict"; var EXPORTED_SYMBOLS = ["HttpRequest"]; var bug669675 = []; var containers = []; var sandboxes = {}; var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); var HttpRequest = class { constructor() { // a private object to store xhr related properties this._xhr = {}; // HttpRequest supports two methods to receive data, using the // streamLoader seems to be the more modern approach. // BUT in order to overide MimeType, we need to call onStartRequest this._xhr.useStreamLoader = false; this._xhr.responseAsBase64 = false; this._xhr.loadFlags = Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE; this._xhr.headers = {}; this._xhr.readyState = 0; this._xhr.responseStatus = null; this._xhr.responseStatusText = null; this._xhr.responseText = null; this._xhr.httpchannel = null; this._xhr.method = null; this._xhr.uri = null; this._xhr.permanentlyRedirectedUrl = null; this._xhr.username = ""; this._xhr.password = ""; this._xhr.overrideMimeType = null; this._xhr.mozAnon = false; this._xhr.mozBackgroundRequest = false; this._xhr.timeout = 0; this._xhr.redirectFlags = null; this._xhr.containerReset = false; this._xhr.containerRealm = "default"; this.onreadystatechange = function () {}; this.onerror = function () {}; this.onload = function () {}; this.ontimeout = function () {}; // Redirects are handled internally, this callback is just called to // inform the caller about the redirect. // Flags: (https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIChannelEventSink) // - REDIRECT_TEMPORARY = 1 << 0; // - REDIRECT_PERMANENT = 1 << 1; // - REDIRECT_INTERNAL = 1 << 2; // TB enforces a redirect from http -> https without having received a redirect, // but an STS header // - REDIRECT_STS_UPGRADE = 1 << 3; // This is a custom bit set by HttpRequest to indicate, that this redirect was missed by the nsIHttpChannel implementation // probably due to a CORS violation (like https -> http) // - REDIRECT_MISSED = 1 << 7; this.onredirect = function(flags, newUri) {}; // Whenever a WWW-Authenticate header has been parsed, this callback is // called to inform the caller about the found realm. this.realmCallback = function (username, realm, host) {}; // Whenever a channel needs authentication, but the caller has only provided a username // this callback is called to request the password. this.passwordCallback = function (username, realm, host) {return null}; var self = this; this.notificationCallbacks = { // nsIInterfaceRequestor getInterface : function(aIID) { if (aIID.equals(Components.interfaces.nsIAuthPrompt2)) { // implement a custom nsIAuthPrompt2 - needed for auto authorization if (!self._xhr.authPrompt) { self._xhr.authPrompt = new HttpRequestPrompt(self._xhr.username, self._xhr.password, self.passwordCallback, self.realmCallback); } return self._xhr.authPrompt; } else if (aIID.equals(Components.interfaces.nsIAuthPrompt)) { // implement a custom nsIAuthPrompt } else if (aIID.equals(Components.interfaces.nsIAuthPromptProvider)) { // implement a custom nsIAuthPromptProvider } else if (aIID.equals(Components.interfaces.nsIPrompt)) { // implement a custom nsIPrompt } else if (aIID.equals(Components.interfaces.nsIProgressEventSink)) { // implement a custom nsIProgressEventSink } else if (aIID.equals(Components.interfaces.nsIChannelEventSink)) { // implement a custom nsIChannelEventSink return self.redirect; } throw Components.results.NS_ERROR_NO_INTERFACE; }, }; this.redirect = { // nsIChannelEventSink implementation asyncOnChannelRedirect: function(aOldChannel, aNewChannel, aFlags, aCallback) { // Disallow redirects from https to http. if (aOldChannel.URI.scheme == "https" && aNewChannel.URI.scheme == "http") { // Using an unused error code according to https://developer.mozilla.org/en-US/docs/Mozilla/Errors. // REJECTED_REDIRECT_FROM_HTTPS_TO_HTTP' aCallback.onRedirectVerifyCallback(0x804B002F); return; } let uploadData; let uploadContent; if (aOldChannel instanceof Ci.nsIUploadChannel && aOldChannel instanceof Ci.nsIHttpChannel && aOldChannel.uploadStream) { uploadData = aOldChannel.uploadStream; uploadContent = aOldChannel.getRequestHeader("Content-Type"); } aNewChannel.QueryInterface(Ci.nsIHttpChannel); aOldChannel.QueryInterface(Ci.nsIHttpChannel); function copyHeader(aHdr) { try { let hdrValue = aOldChannel.getRequestHeader(aHdr); if (hdrValue) { aNewChannel.setRequestHeader(aHdr, hdrValue, false); } } catch (e) { if (e.code != Components.results.NS_ERROR_NOT_AVAILIBLE) { // The header could possibly not be available, ignore that // case but throw otherwise throw e; } } } // Copy manually added headers for (let header in self._xhr.headers) { if (self._xhr.headers.hasOwnProperty(header)) { copyHeader(header); } } prepHttpChannelUploadData( aNewChannel, aOldChannel.requestMethod, uploadData, uploadContent); self._xhr.redirectFlags = aFlags; if (aFlags & Ci.nsIChannelEventSink.REDIRECT_PERMANENT) { self._xhr.permanentlyRedirectedUrl = aNewChannel.URI.spec; } self.onredirect(aFlags, aNewChannel.URI); aCallback.onRedirectVerifyCallback(Components.results.NS_OK); } }; this.listener = { _buffer: [], //nsIStreamListener (aUseStreamLoader = false) onStartRequest: function(aRequest) { //Services.console.logStringMessage("[onStartRequest] " + aRequest.URI.spec); this._buffer = []; if (self._xhr.overrideMimeType) { aRequest.contentType = self._xhr.overrideMimeType; } }, onDataAvailable: function (aRequest, aInputStream, aOffset, aCount) { //Services.console.logStringMessage("[onDataAvailable] " + aRequest.URI.spec + " : " + aCount); let buffer = new ArrayBuffer(aCount); let stream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream); stream.setInputStream(aInputStream); stream.readArrayBuffer(aCount, buffer); // store the chunk this._buffer.push(Array.from(new Uint8Array(buffer))); }, onStopRequest: function(aRequest, aStatusCode) { //Services.console.logStringMessage("[onStopRequest] " + aRequest.URI.spec + " : " + aStatusCode); // combine all binary chunks to create a flat byte array; let combined = [].concat.apply([], this._buffer); let data = convertByteArray(combined, self.responseAsBase64); this.processResponse(aRequest.QueryInterface(Components.interfaces.nsIHttpChannel), aStatusCode, data); }, //nsIStreamLoaderObserver (aUseStreamLoader = true) onStreamComplete: function(aLoader, aContext, aStatus, aResultLength, aResult) { let result = convertByteArray(aResult, self.responseAsBase64); this.processResponse(aLoader.request.QueryInterface(Components.interfaces.nsIHttpChannel), aStatus, result); }, processResponse: function(aChannel, aStatus, aResult) { //Services.console.logStringMessage("[processResponse] " + aChannel.URI.spec + " : " + aStatus); // do not set any channal response data, before we know we failed // and before we know we do not have to rerun (due to bug 669675) let responseStatus = null; try { responseStatus = aChannel.responseStatus; } catch (ex) { switch (aStatus) { case Components.results.NS_ERROR_NET_TIMEOUT: self._xhr.httpchannel = aChannel; self._xhr.responseText = aResult; self._xhr.responseStatus = 0; self._xhr.responseStatusText = ""; self._xhr.readyState = 4; self.onreadystatechange(); self.ontimeout(); return; case Components.results.NS_BINDING_ABORTED: case 0x804B002F: //Custom error (REJECTED_REDIRECT_FROM_HTTPS_TO_HTTP') self._xhr.httpchannel = aChannel; self._xhr.responseText = aResult; self._xhr.responseStatus = 0; self._xhr.responseStatusText = ""; self._xhr.readyState = 0; self.onreadystatechange(); self.onerror(); return; case 0x805303F4: //NS_ERROR_DOM_BAD_URI // Error on Strict-Transport-Security induced Redirect http -> https (these do not even show up in the console) // The redirect has been done already and the channel is already the new channel. // Due to CORS violation, it cannot be fulfilled. if (self._xhr.redirectFlags && aChannel.URI.spec != self._xhr.uri.spec) { self._xhr.uri = aChannel.URI; self.send(self._xhr.data); return; } default: self._xhr.httpchannel = aChannel; self._xhr.responseText = aResult; self._xhr.responseStatus = 0; self._xhr.responseStatusText = ""; self._xhr.readyState = 4; self.onreadystatechange(); self.onerror(); return; } } // Usually redirects are handled internally, but any CORS violating request is // returning a 30x, if CORS is not allowed. This is not true for STS induced redirects (see above). if ([301,302,307,308].includes(responseStatus)) { // aChannel is still the old channel let redirected = self.getResponseHeader("location"); if (redirected && redirected != aChannel.URI.spec) { let flag = Ci.nsIChannelEventSink.REDIRECT_TEMPORARY; let uri = Services.io.newURI(redirected); if ([301,308].includes(responseStatus)) { flag = Ci.nsIChannelEventSink.REDIRECT_PERMANENT; self._xhr.permanentlyRedirectedUrl = uri.spec; } // inform caller about the redirect and set the REDIRECT_MISSED bit self.onredirect(flag | 0x80, uri); self._xhr.uri = uri; self.send(self._xhr.data); return; } } // mitigation for bug https://bugzilla.mozilla.org/show_bug.cgi?id=669675 // we need to check, if nsIHttpChannel was in charge of auth: // if there was no Authentication header provided by the user, but a username // nsIHttpChannel should have added one. Is there one? if ( (responseStatus == 401) && !self._xhr.mozAnon && !self.hasRequestHeader("Authorization") && // no user defined header, so nsIHttpChannel should have called the authPrompt self._xhr.username && // we can only add basic auth header if user self._xhr.password // and pass are present ) { // check the actual Authorization headers send let unauthenticated; try { let header = aChannel.getRequestHeader("Authorization"); unauthenticated = false; } catch (e) { unauthenticated = true; } if (unauthenticated) { if (!bug669675.includes(self._xhr.uri.spec)) { bug669675.push(self._xhr.uri.spec) console.log("Mitigation for bug 669675 for URL <"+self._xhr.uri.spec+"> (Once per URL per session)"); // rerun self.send(self._xhr.data); return; } else { console.log("Mitigation failed for URL <"+self._xhr.uri.spec+">"); } } } self._xhr.httpchannel = aChannel; self._xhr.responseText = aResult; self._xhr.responseStatus = responseStatus; self._xhr.responseStatusText = aChannel.responseStatusText; self._xhr.readyState = 4; self.onreadystatechange(); self.onload(); } }; } /** public **/ open(method, url, async = true, username = "", password = "") { this._xhr.method = method; try { this._xhr.uri = Services.io.newURI(url); } catch (e) { Components.utils.reportError(e); throw new Error("HttpRequest: Invalid URL <"+url+">"); } if (!async) throw new Error ("HttpRequest: Synchronous requests not implemented."); this._xhr.username = username; this._xhr.password = password; this._xhr.readyState = 1; this.onreadystatechange(); } // must be called after open, before send setContainerRealm(v) { this._xhr.containerRealm = v; } // must be called after open, before send clearContainerCache() { this._xhr.containerReset = true; } send(data) { //store the data, so we can rerun this._xhr.data = data; this._xhr.redirectFlags = null; // The sandbox will have a loadingNode let sandbox = getSandboxForOrigin(this._xhr.username, this._xhr.uri, this._xhr.containerRealm, this._xhr.containerReset); // The XHR in the sandbox will have the correct loadInfo, which will allow us // to use cookies and a CodebasePrincipal for us to use userContextIds and to // contact nextcloud servers (error 503). // We will not use the XHR or the sandbox itself. let XHR = new sandbox.XMLHttpRequest(); XHR.open(this._xhr.method, this._xhr.uri.spec); // Create the channel with the loadInfo from the sandboxed XHR let channel = Services.io.newChannelFromURIWithLoadInfo(this._xhr.uri, XHR.channel.loadInfo); /* // as of TB67 newChannelFromURI needs to specify a loading node to have access to the cookie jars // using the main window // another option would be workers let options = {}; let mainWindow = Services.wm.getMostRecentWindow("mail:3pane"); let channel = Services.io.newChannelFromURI( this._xhr.uri, mainWindow.document, Services.scriptSecurityManager.createCodebasePrincipal(this._xhr.uri, options), null, Components.interfaces.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL, Components.interfaces.nsIContentPolicy.TYPE_OTHER); */ /* // enforce anonymous access if requested (will not work with proxy, see MDN) if (this._xhr.mozAnon) { channel.loadFlag |= Components.interfaces.nsIRequest.LOAD_ANONYMOUS; } // set background request if (this._xhr.mozBackgroundRequest) { channel.loadFlag |= Components.interfaces.nsIRequest.LOAD_BACKGROUND; } */ this._xhr.httpchannel = channel.QueryInterface(Components.interfaces.nsIHttpChannel); this._xhr.httpchannel.loadFlags |= this._xhr.loadFlags; this._xhr.httpchannel.notificationCallbacks = this.notificationCallbacks; // Set default content type. if (!this.hasRequestHeader("Content-Type")) { this.setRequestHeader("Content-Type", "application/xml; charset=utf-8") } // Set default accept value. if (!this.hasRequestHeader("Accept")) { this.setRequestHeader("Accept", "*/*"); } // Set non-standard header to request authorization (https://github.com/jobisoft/DAV-4-TbSync/issues/106) if (this._xhr.username) { this.setRequestHeader("X-EnforceAuthentication", "True"); } // calculate length of request and add header if (data) { let textEncoder = new TextEncoder(); let encoded = textEncoder.encode(data); this.setRequestHeader("Content-Length", encoded.length); } // mitigation for bug 669675 if ( bug669675.includes(this._xhr.uri.spec) && !this._xhr.mozAnon && !this.hasRequestHeader("Authorization") && this._xhr.username && this._xhr.password ) { this.setRequestHeader("Authorization", "Basic " + b64EncodeUnicode(this._xhr.username + ':' + this._xhr.password)); } // add all headers to the channel for (let header in this._xhr.headers) { if (this._xhr.headers.hasOwnProperty(header)) { this._xhr.httpchannel.setRequestHeader(header, this._xhr.headers[header], false); } } // Will overwrite the Content-Type, so it must be called after the headers have been set. prepHttpChannelUploadData(this._xhr.httpchannel, this._xhr.method, data, this.getRequestHeader("Content-Type")); if (this._xhr.useStreamLoader) { let loader = Components.classes["@mozilla.org/network/stream-loader;1"].createInstance(Components.interfaces.nsIStreamLoader); loader.init(this.listener); this.listener = loader; } this._startTimeout(); this._xhr.httpchannel.asyncOpen(this.listener, this._xhr.httpchannel); } get readyState() { return this._xhr.readyState; } get responseURI() { return this._xhr.httpchannel.URI; } get responseURL() { return this._xhr.httpchannel.URI.spec; } get permanentlyRedirectedUrl() { return this._xhr.permanentlyRedirectedUrl; } get responseText() { return this._xhr.responseText; } get status() { return this._xhr.responseStatus; } get statusText() { return this._xhr.responseStatusText; } get channel() { return this._xhr.httpchannel; } get loadFlags() { return this._xhr.loadFlags; } get timeout() { return this._xhr.timeout; } get mozBackgroundRequest() { return this._xhr.mozBackgroundRequest; } get mozAnon() { return this._xhr.mozAnon; } set loadFlags(v) { this._xhr.loadFlags = v; } set timeout(v) { this._xhr.timeout = v; } set mozBackgroundRequest(v) { this._xhr.mozBackgroundRequest = (v === true); } set mozAnon(v) { this._xhr.mozAnon = (v === true); } // case insensitive method to check for headers hasRequestHeader(header) { let lowHeaders = Object.keys(this._xhr.headers).map(x => x.toLowerCase()); return lowHeaders.includes(header.toLowerCase()); } // if a header exists (case insensitive), it will be replaced (keeping the original capitalization) setRequestHeader(header, value) { let useHeader = header; let lowHeader = header.toLowerCase(); for (let h in this._xhr.headers) { if (this._xhr.headers.hasOwnProperty(h) && h.toLowerCase() == lowHeader) { useHeader = h; break; } } this._xhr.headers[useHeader] = value; } // checks if a header (case insensitive) has been set by setRequestHeader - that does not mean it has been added to the channel! getRequestHeader(header) { let lowHeader = header.toLowerCase(); for (let h in this._xhr.headers) { if (this._xhr.headers.hasOwnProperty(h) && h.toLowerCase() == lowHeader) { return this._xhr.headers[h]; } } return null; } getResponseHeader(header) { try { return this._xhr.httpchannel.getResponseHeader(header); } catch (e) { if (e.code != Components.results.NS_ERROR_NOT_AVAILIBLE) { // The header could possibly not be available, ignore that // case but throw otherwise throw e; } } return null; } overrideMimeType(mime) { this._xhr.overrideMimeType = mime; } abort() { this._cancel(Components.results.NS_BINDING_ABORTED); } get responseAsBase64() { return this._xhr.responseAsBase64; } set responseAsBase64(v) { this._xhr.responseAsBase64 = (v == true);} /* not used */ get responseXML() { throw new Error("HttpRequest: responseXML not implemented"); } get response() { throw new Error("HttpRequest: response not implemented"); } set response(v) { throw new Error("HttpRequest: response not implemented"); } get responseType() { throw new Error("HttpRequest: response not implemented"); } set responseType(v) { throw new Error("HttpRequest: response not implemented"); } get upload() { throw new Error("HttpRequest: upload not implemented"); } set upload(v) { throw new Error("HttpRequest: upload not implemented"); } get withCredentials() { throw new Error("HttpRequest: withCredentials not implemented"); } set withCredentials(v) { throw new Error("HttpRequest: withCredentials not implemented"); } /** private helper methods **/ _startTimeout() { let that = this; this._xhr.timer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer); let event = { notify: function(timer) { that._cancel(Components.results.NS_ERROR_NET_TIMEOUT) } } this._xhr.timer.initWithCallback( event, this._xhr.timeout, Components.interfaces.nsITimer.TYPE_ONE_SHOT); } _cancel(error) { if (this._xhr.httpchannel && error) { this._xhr.httpchannel.cancel(error); } } } var HttpRequestPrompt = class { constructor(username, password, promptCallback, realmCallback) { this.mCounts = 0; this.mUsername = username; this.mPassword = password; this.mPromptCallback = promptCallback; this.mRealmCallback = realmCallback; } // boolean promptAuth(in nsIChannel aChannel, // in uint32_t level, // in nsIAuthInformation authInfo) promptAuth (aChannel, aLevel, aAuthInfo) { this.mRealmCallback(this.mUsername, aAuthInfo.realm, aChannel.URI.host); if (this.mUsername && this.mPassword) { console.log("Passing provided credentials for user <"+this.mUsername+"> to nsIHttpChannel."); aAuthInfo.username = this.mUsername; aAuthInfo.password = this.mPassword; } else if (this.mUsername) { console.log("Using passwordCallback callback to get password for user <"+this.mUsername+"> and realm <"+aAuthInfo.realm+"> @ host <"+aChannel.URI.host+">"); let password = this.mPromptCallback(this.mUsername, aAuthInfo.realm, aChannel.URI.host); if (password) { aAuthInfo.username = this.mUsername; aAuthInfo.password = password; } else { return false; } } else { return false; } // The provided password could be wrong, in whichcase // we would be here more than once. this.mCounts++ return (this.mCounts < 2); } } function getSandboxForOrigin(username, uri, containerRealm = "default", containerReset = false) { let options = {}; let origin = uri.scheme + "://" + uri.hostPort; if (username) { options.userContextId = getContainerIdForUser(containerRealm + "::" + username); origin = options.userContextId + "@" + origin; if (containerReset) { resetContainerWithId(options.userContextId); } } if (!sandboxes.hasOwnProperty(origin)) { console.log("Creating sandbox for <"+origin+">"); let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, options); sandboxes[origin] = Components.utils.Sandbox(principal, { wantXrays: true, wantGlobalProperties: ["XMLHttpRequest"], }); } return sandboxes[origin]; } function resetContainerWithId(id) { Services.clearData.deleteDataFromOriginAttributesPattern({ userContextId: id }); } function getContainerIdForUser(username) { // Define the allowed range of container ids to be used // TbSync is using 10000 - 19999 // Lightning is using 20000 - 29999 // Cardbook is using 30000 - 39999 let min = 10000; let max = 19999; //reset if adding an entry will exceed allowed range if (containers.length > (max-min) && containers.indexOf(username) == -1) { for (let i=0; i < containers.length; i++) { resetContainerWithId(i + min); } containers = []; } let idx = containers.indexOf(username); return (idx == -1) ? containers.push(username) - 1 + min : (idx + min); } // copied from cardbook function b64EncodeUnicode (aString) { return btoa(encodeURIComponent(aString).replace(/%([0-9A-F]{2})/g, function(match, p1) { return String.fromCharCode('0x' + p1); })); } // copied from lightning function prepHttpChannelUploadData(aHttpChannel, aMethod, aUploadData, aContentType) { if (aUploadData) { aHttpChannel.QueryInterface(Components.interfaces.nsIUploadChannel); let stream; if (aUploadData instanceof Components.interfaces.nsIInputStream) { // Make sure the stream is reset stream = aUploadData.QueryInterface(Components.interfaces.nsISeekableStream); stream.seek(Components.interfaces.nsISeekableStream.NS_SEEK_SET, 0); } else { // Otherwise its something that should be a string, convert it. let converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createInstance(Components.interfaces.nsIScriptableUnicodeConverter); converter.charset = "UTF-8"; stream = converter.convertToInputStream(aUploadData.toString()); } // If aContentType is empty, the protocol will assume that no content headers are to be // added to the uploaded stream and that any required headers are already encoded in // the stream. In the case of HTTP, if this parameter is non-empty, then its value will // replace any existing Content-Type header on the HTTP request. In the case of FTP and // FILE, this parameter is ignored. aHttpChannel.setUploadStream(stream, aContentType, -1); } //must be set after setUploadStream //https://developer.mozilla.org/en-US/docs/Mozilla/Creating_sandboxed_HTTP_connections aHttpChannel.QueryInterface(Ci.nsIHttpChannel); aHttpChannel.requestMethod = aMethod; } /** * Convert a byte array to a string - copied from lightning * * @param {octet[]} aResult The bytes to convert * @param {Boolean} responseAsBase64 Return a base64 encoded string * @param {String} aCharset The character set of the bytes, defaults to utf-8 * @param {Boolean} aThrow If true, the function will raise an exception on error * @returns {?String} The string result, or null on error */ function convertByteArray(aResult, responseAsBase64 = false, aCharset="utf-8", aThrow) { if (responseAsBase64) { var bin = ''; var bytes = Uint8Array.from(aResult); var len = bytes.byteLength; for (var i = 0; i < len; i++) { bin += String.fromCharCode( bytes[ i ] ); } return btoa( bin ); // if we ever need raw, return bin } else { try { return new TextDecoder(aCharset).decode(Uint8Array.from(aResult)); } catch (e) { if (aThrow) { throw e; } } } return null; } TbSync-2.11/content/OverlayManager.jsm000066400000000000000000000415431362330670600177550ustar00rootroot00000000000000/* * This file is part of TbSync. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; var EXPORTED_SYMBOLS = ["OverlayManager"]; var { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); function OverlayManager(options = {}) { this.registeredOverlays = {}; this.overlays = {}; this.stylesheets = {}; this.options = {verbose: 0}; let userOptions = Object.keys(options); for (let i=0; i < userOptions.length; i++) { this.options[userOptions[i]] = options[userOptions[i]]; } this.windowListener = { that: this, onOpenWindow: function(xulWindow) { let window = xulWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindow); this.that.injectAllOverlays(window); }, onCloseWindow: function(xulWindow) { }, onWindowTitleChange: function(xulWindow, newTitle) { } }; this.startObserving = function () { let windows = Services.wm.getEnumerator(null); while (windows.hasMoreElements()) { let window = windows.getNext().QueryInterface(Components.interfaces.nsIDOMWindow); //inject overlays for this window this.injectAllOverlays(window); } Services.wm.addListener(this.windowListener); }; this.stopObserving = function () { Services.wm.removeListener(this.windowListener); let windows = Services.wm.getEnumerator(null); while (windows.hasMoreElements()) { let window = windows.getNext().QueryInterface(Components.interfaces.nsIDOMWindow); //remove overlays (if any) this.removeAllOverlays(window); } }; this.hasRegisteredOverlays = function (window) { return this.registeredOverlays.hasOwnProperty(window.location.href); }; this.registerOverlay = async function (dst, overlay, attributesOverrides = []) { if (overlay.startsWith("chrome://")) { let xul = await this.readChromeFile(overlay); let rootNode = this.getDataFromXULString(null, xul); //get urls of stylesheets to load them let styleSheetUrls = this.getStyleSheetUrls(rootNode); for (let i=0; i1) Services.console.logStringMessage("[OverlayManager] BAD XUL: A provided XUL file is empty!"); return null; } let oParser = new DOMParser(); try { xul = oParser.parseFromString(str, "application/xml"); } catch (e) { //however, domparser does not throw an error, it returns an error document //https://developer.mozilla.org/de/docs/Web/API/DOMParser //just in case if (this.options.verbose>1) Services.console.logStringMessage("[OverlayManager] BAD XUL: A provided XUL file could not be parsed correctly, something is wrong.\n" + str); return null; } //check if xul is error document if (xul.documentElement.nodeName == "parsererror") { if (this.options.verbose>1) Services.console.logStringMessage("[OverlayManager] BAD XUL: A provided XUL file could not be parsed correctly, something is wrong.\n" + str); return null; } if (xul.documentElement.nodeName != "overlay") { if (this.options.verbose>1) Services.console.logStringMessage("[OverlayManager] BAD XUL: A provided XUL file does not look like an overlay (root node is not overlay).\n" + str); return null; } return xul; }; this.injectAllOverlays = async function (window, _href = null) { if (window.document.readyState != "complete") { // Make sure the window load has completed. await new Promise(resolve => { window.addEventListener("load", resolve, { once: true }); }); } let href = (_href === null) ? window.location.href : _href; for (let i=0; this.registeredOverlays[href] && i < this.registeredOverlays[href].length; i++) { this.injectOverlay(window, this.registeredOverlays[href][i]); } }; this.removeAllOverlays = function (window) { if (!this.hasRegisteredOverlays(window)) return; for (let i=0; i < this.registeredOverlays[window.location.href].length; i++) { this.removeOverlay(window, this.registeredOverlays[window.location.href][i]); } }; this.injectOverlay = function (window, overlay) { if (!window.hasOwnProperty("injectedOverlays")) window.injectedOverlays = []; if (window.injectedOverlays.includes(overlay)) { if (this.options.verbose>2) Services.console.logStringMessage("[OverlayManager] NOT Injecting: " + overlay); return; } let rootNode = this.overlays[overlay]; if (rootNode) { let overlayNode = rootNode.documentElement; if (overlayNode) { //get and load scripts let scripts = this.getScripts(rootNode, overlayNode); for (let i=0; i < scripts.length; i++){ if (this.options.verbose>3) Services.console.logStringMessage("[OverlayManager] Loading: " + scripts[i]); Services.scriptloader.loadSubScript(scripts[i], window); } //eval onbeforeinject, if that returns false, inject is aborted let inject = true; if (overlayNode.hasAttribute("onbeforeinject")) { let onbeforeinject = overlayNode.getAttribute("onbeforeinject"); if (this.options.verbose>3) Services.console.logStringMessage("[OverlayManager] Executing: " + onbeforeinject); // the source for this eval is part of this XPI, cannot be changed by user. inject = window.eval(onbeforeinject); } if (inject) { if (this.options.verbose>2) Services.console.logStringMessage("[OverlayManager] Injecting: " + overlay); window.injectedOverlays.push(overlay); //get urls of stylesheets to add preloaded files let styleSheetUrls = this.getStyleSheetUrls(rootNode); for (let i=0; i3) Services.console.logStringMessage("[OverlayManager] Stylesheet: " + styleSheetUrls[i]); } this.insertXulOverlay(window, overlayNode.children); //execute oninject if (overlayNode.hasAttribute("oninject")) { let oninject = overlayNode.getAttribute("oninject"); if (this.options.verbose>3) Services.console.logStringMessage("[OverlayManager] Executing: " + oninject); // the source for this eval is part of this XPI, cannot be changed by user. window.eval(oninject); } } } } }; this.removeOverlay = function (window, overlay) { if (!window.hasOwnProperty("injectedOverlays")) window.injectedOverlays = []; if (!window.injectedOverlays.includes(overlay)) { if (this.options.verbose>2) Services.console.logStringMessage("[OverlayManager] NOT Removing: " + overlay); return; } if (this.options.verbose>2) Services.console.logStringMessage("[OverlayManager] Removing: " + overlay); window.injectedOverlays = window.injectedOverlays.filter(e => (e != overlay)); // let rootNode = this.getDataFromXULString(window, this.overlays[overlay]); let rootNode = this.overlays[overlay]; let overlayNode = rootNode.documentElement; if (overlayNode.hasAttribute("onremove")) { let onremove = overlayNode.getAttribute("onremove"); if (this.options.verbose>3) Services.console.logStringMessage("[OverlayManager] Executing: " + onremove); // the source for this eval is part of this XPI, cannot be changed by user. window.eval(onremove); } this.removeXulOverlay(window, overlayNode.children); //get urls of stylesheets to remove styte tag let styleSheetUrls = this.getStyleSheetUrls(rootNode); for (let i=0; i1) Services.console.logStringMessage("[OverlayManager] BAD XUL: A top level <" + node.nodeName+ "> element does not have an ID. Skipped"); continue; } //check for inline script tags if (node.nodeName == "script") { let element = this.createXulElement(window, node, "html:script"); //force as html:script window.document.documentElement.appendChild(element); continue; } //check for inline style if (node.nodeName == "style") { let element = this.createXulElement(window, node, "html:style"); //force as html:style window.document.documentElement.appendChild(element); continue; } if (node.hasAttribute("appendto")) hookMode = "appendto"; if (node.hasAttribute("insertbefore")) hookMode ="insertbefore"; if (node.hasAttribute("insertafter")) hookMode = "insertafter"; if (hookMode) { hookName = node.getAttribute(hookMode); hookElement = window.document.getElementById(hookName); if (!hookElement) { if (this.options.verbose>1) Services.console.logStringMessage("[OverlayManager] BAD XUL: The hook element <"+hookName+"> of top level overlay element <"+ node.nodeName+"> does not exist. Skipped"); continue; } } else { hookMode = "appendto"; hookName = "ROOT"; hookElement = window.document.documentElement; } } element = this.createXulElement(window, node); if (node.hasChildNodes) this.insertXulOverlay(window, node.children, element); if (parentElement) { // this is a child level XUL element which needs to be added to to its parent parentElement.appendChild(element); } else { // this is a toplevel element, which needs to be added at insertafter or insertbefore switch (hookMode) { case "appendto": hookElement.appendChild(element); break; case "insertbefore": hookElement.parentNode.insertBefore(element, hookElement); break; case "insertafter": hookElement.parentNode.insertBefore(element, hookElement.nextSibling); break; default: if (this.options.verbose>1) Services.console.logStringMessage("[OverlayManager] BAD XUL: Top level overlay element <"+ node.nodeName+"> uses unknown hook type <"+hookMode+">. Skipped."); continue; } if (this.options.verbose>3) Services.console.logStringMessage("[OverlayManager] Adding <"+element.id+"> ("+element.tagName+") " + hookMode + " <" + hookName + ">"); } } } }; this.removeXulOverlay = function (window, nodes, parentElement = null) { //only scan toplevel elements and remove them let nodeList = []; if (nodes.length === undefined) nodeList.push(nodes); else nodeList = nodes; // nodelist contains all childs for (let node of nodeList) { let element = null; switch(node.nodeType) { case 1: if (node.hasAttribute("id")) { let element = window.document.getElementById(node.getAttribute("id")); if (element) { element.parentNode.removeChild(element); } } break; } } }; //read file from within the XPI package this.readChromeFile = function (aURL) { return new Promise((resolve, reject) => { let uri = Services.io.newURI(aURL); let channel = Services.io.newChannelFromURI(uri, null, Services.scriptSecurityManager.getSystemPrincipal(), null, Components.interfaces.nsILoadInfo.SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS, Components.interfaces.nsIContentPolicy.TYPE_OTHER); NetUtil.asyncFetch(channel, (inputStream, status) => { if (!Components.isSuccessCode(status)) { reject(status); return; } try { let data = NetUtil.readInputStreamToString(inputStream, inputStream.available()); resolve(data); } catch (ex) { reject(ex); } }); }); }; } TbSync-2.11/content/manager/000077500000000000000000000000001362330670600157315ustar00rootroot00000000000000TbSync-2.11/content/manager/accountManager.js000066400000000000000000000133741362330670600212260ustar00rootroot00000000000000/* * This file is part of TbSync. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); var { TbSync } = ChromeUtils.import("chrome://tbsync/content/tbsync.jsm"); var tbSyncAccountManager = { onloadoptions: function () { window.close(); }, onunloadoptions: function () { TbSync.manager.openManagerWindow(0); }, onload: function () { TbSync.AccountManagerTabs = ["accounts.xul", "catman.xul", "supporter.xul", "help.xul"]; tbSyncAccountManager.selectTab(0); }, onunload: function () { TbSync.manager.prefWindowObj = null; }, selectTab: function (t) { const LOAD_FLAGS_NONE = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; //set active tab (css selector for background color) for (let i=0; i