Changeset 509348 for content/vI_overlay.js
- Timestamp:
- Nov 3, 2014, 12:35:40 PM (8 years ago)
- Branches:
- ng_0.9
- Children:
- 7204cb
- Parents:
- 3c9c29
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
content/vI_overlay.js
r3c9c29 r509348 1 1 /* ***** BEGIN LICENSE BLOCK ***** 2 This program is free software; you can redistribute it and/or modify3 it under the terms of the GNU General Public License as published by4 the Free Software Foundation; either version 2 of the License, or5 (at your option) any later version.2 This program is free software; you can redistribute it and/or modify 3 it under the terms of the GNU General Public License as published by 4 the Free Software Foundation; either version 2 of the License, or 5 (at your option) any later version. 6 6 7 This program is distributed in the hope that it will be useful,8 but WITHOUT ANY WARRANTY; without even the implied warranty of9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 GNU General Public License for more details.7 This program is distributed in the hope that it will be useful, 8 but WITHOUT ANY WARRANTY; without even the implied warranty of 9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 GNU General Public License for more details. 11 11 12 You should have received a copy of the GNU General Public License13 along with this program; if not, write to the Free Software14 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA12 You should have received a copy of the GNU General Public License 13 along with this program; if not, write to the Free Software 14 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 15 16 The Original Code is the Virtual Identity Extension.16 The Original Code is the Virtual Identity Extension. 17 17 18 The Initial Developer of the Original Code is Rene Ejury.19 Portions created by the Initial Developer are Copyright (C) 201120 the Initial Developer. All Rights Reserved.18 The Initial Developer of the Original Code is Rene Ejury. 19 Portions created by the Initial Developer are Copyright (C) 2011 20 the Initial Developer. All Rights Reserved. 21 21 22 Contributor(s):23 * ***** END LICENSE BLOCK ***** */22 Contributor(s): 23 * ***** END LICENSE BLOCK ***** */ 24 24 25 Components.utils.import("resource://v_identity/vI_nameSpaceWrapper.js"); 26 virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) { 27 28 let Log = vI.setupLogging("virtualIdentity.overlay"); 25 Components.utils.import("resource://v_identity/vI_nameSpaceWrapper.js"); 26 virtualIdentityExtension.ns(function () { 27 with(virtualIdentityExtension.LIB) { 29 28 30 Components.utils.import("resource://v_identity/vI_rdfDatasource.js", virtualIdentityExtension); 31 Components.utils.import("resource://v_identity/vI_account.js", virtualIdentityExtension); 32 Components.utils.import("resource://v_identity/vI_prefs.js", virtualIdentityExtension); 29 let Log = vI.setupLogging("virtualIdentity.overlay"); 33 30 34 Components.utils.import("resource://gre/modules/AddonManager.jsm"); 31 Components.utils.import("resource://v_identity/vI_rdfDatasource.js", virtualIdentityExtension); 32 Components.utils.import("resource://v_identity/vI_account.js", virtualIdentityExtension); 33 Components.utils.import("resource://v_identity/vI_prefs.js", virtualIdentityExtension); 35 34 36 const virtualIdentity_ID="{dddd428e-5ac8-4a81-9f78-276c734f75b8}" 37 AddonManager.getAddonByID(virtualIdentity_ID, function(addon) { 38 if (addon) 39 vI.extensionVersion = addon.version; 40 }); 35 Components.utils.import("resource://gre/modules/AddonManager.jsm"); 36 37 const virtualIdentity_ID = "{dddd428e-5ac8-4a81-9f78-276c734f75b8}" 38 AddonManager.getAddonByID(virtualIdentity_ID, function (addon) { 39 if (addon) 40 vI.extensionVersion = addon.version; 41 }); 41 42 42 43 43 function extensionInit() { 44 Log.debug("init") 45 vI.upgrade.quickUpgrade(); 46 vI.vIaccount_cleanupSystem(); // always clean leftover accounts and directories 47 48 if (vI.vIprefs.get("error_console")) { 49 document.getElementById("virtualIdentityExtension_vIErrorBoxSplitter").removeAttribute("hidden"); 50 document.getElementById("virtualIdentityExtension_vIErrorBox").removeAttribute("hidden"); 51 document.getElementById("virtualIdentityExtension_vIErrorBox").setAttribute("class", "console-box"); 52 vI.prefroot.setBoolPref("javascript.options.showInConsole", true); 53 vI.prefroot.setBoolPref("browser.dom.window.dump.enabled", true); 54 vI.prefroot.setBoolPref("javascript.options.strict", true); 55 } 56 } 44 function extensionInit() { 45 Log.debug("init") 46 vI.upgrade.quickUpgrade(); 47 vI.vIaccount_cleanupSystem(); // always clean leftover accounts and directories 57 48 58 addEventListener('messagepane-loaded', extensionInit, true); 59 // this is the entry place, nameSpaceWrapper is loaded and the show can start 60 try { 61 Components.utils.import("resource://v_identity/plugins/conversations.js", virtualIdentityExtension); 62 } catch(e) { 63 vI.dumpCallStack(e); 64 } 49 if (vI.vIprefs.get("error_console")) { 50 document.getElementById("virtualIdentityExtension_vIErrorBoxSplitter").removeAttribute("hidden"); 51 document.getElementById("virtualIdentityExtension_vIErrorBox").removeAttribute("hidden"); 52 document.getElementById("virtualIdentityExtension_vIErrorBox").setAttribute("class", "console-box"); 53 vI.prefroot.setBoolPref("javascript.options.showInConsole", true); 54 vI.prefroot.setBoolPref("browser.dom.window.dump.enabled", true); 55 vI.prefroot.setBoolPref("javascript.options.strict", true); 56 } 57 } 58 59 addEventListener('messagepane-loaded', extensionInit, true); 60 // this is the entry place, nameSpaceWrapper is loaded and the show can start 61 try { 62 Components.utils.import("resource://v_identity/plugins/conversations.js", virtualIdentityExtension); 63 } catch (e) { 64 vI.dumpCallStack(e); 65 } 65 66 66 67 67 }}); 68 } 69 });
Note: See TracChangeset
for help on using the changeset viewer.