This is just some static backup of the original site, don't expect every link to work!

source: content/vI_overlay.js @ 3f9e46

ng_0.9
Last change on this file since 3f9e46 was 3f9e46, checked in by rene <rene@…>, 4 years ago

is now done once in extUpgrade

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/* ***** BEGIN LICENSE BLOCK *****
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
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
12    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
16    The Original Code is the Virtual Identity Extension.
17
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
22    Contributor(s):
23 * ***** END LICENSE BLOCK ***** */
24
25Components.utils.import("resource://v_identity/vI_nameSpaceWrapper.js");
26virtualIdentityExtension.ns(function () {
27  with(virtualIdentityExtension.LIB) {
28
29    let Log = vI.setupLogging("virtualIdentity.overlay");
30
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);
34
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        Log.debug("current version = " + vI.extensionVersion);
42      }
43    });
44
45
46    function extensionInit() {
47      Log.debug("init")
48      vI.upgrade.quickUpgrade();
49
50      if (vI.vIprefs.get("error_console")) {
51        document.getElementById("virtualIdentityExtension_vIErrorBoxSplitter").removeAttribute("hidden");
52        document.getElementById("virtualIdentityExtension_vIErrorBox").removeAttribute("hidden");
53        document.getElementById("virtualIdentityExtension_vIErrorBox").setAttribute("class", "console-box");
54        vI.prefroot.setBoolPref("javascript.options.showInConsole", true);
55        vI.prefroot.setBoolPref("browser.dom.window.dump.enabled", true);
56        vI.prefroot.setBoolPref("javascript.options.strict", true);
57      }
58    }
59
60    addEventListener('messagepane-loaded', extensionInit, true);
61    Log.debug("init rdfDatasource");
62    var rdfDatasource = vI.rdfDatasourceAccess(window);
63    Log.debug("init rdfDatasource done");
64  }
65});
Note: See TracBrowser for help on using the repository browser.