~ubuntu-branches/ubuntu/hardy/foxyproxy/hardy-updates

« back to all changes in this revision

Viewing changes to chrome/content/optionsOverlay.js

  • Committer: Bazaar Package Importer
  • Author(s): Sasa Bodiroza
  • Date: 2008-04-09 13:55:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080409135500-x7u28czocbidxpmg
Tags: 2.7.2-0ubuntu1
* New upstream release. (LP: #212875)
* Improved packaging to make use of xpi.mk
* debian/control: 
  - Updated Maintainer field according to DebianMaintainerField spec
  - s/IceWeasel/Firefox/ in description
* debian/copyright: 
  - Updated copyright years
  - Updated packaging copyright
  - Added notice about xpi.mk packaging
  - Getting the source differs for this upload, added notice
* install.rdf: Bumped maxVersion to 3.0.*

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
  FoxyProxy
 
3
  Copyright (C) 2006-2008 Eric H. Jung and LeahScape, Inc.
 
4
  http://foxyproxy.mozdev.org/
 
5
  eric.jung@yahoo.com
 
6
 
 
7
  This source code is released under the GPL license,
 
8
  available in the LICENSE file at the root of this installation
 
9
  and also online at http://www.gnu.org/licenses/gpl.txt
 
10
**/
 
11
window.onload=function(){
 
12
  // works with ff 1.5, 2.x, and 3.x
 
13
  var e = document.getElementById("catProxiesButton") || document.getElementById("connectionSettings");
 
14
  if (e) e.setAttribute("oncommand", "onConnectionSettings();");
 
15
  else {
 
16
          try {
 
17
            gAdvancedPane && (gAdvancedPane.showConnections = onConnectionSettings);
 
18
          }
 
19
          catch (e) {dump(e);/*wtf*/}
 
20
        }
 
21
}
 
22
function onConnectionSettings() {
 
23
  var fp = Components.classes["@leahscape.org/foxyproxy/service;1"]
 
24
    .getService(Components.interfaces.nsISupports).wrappedJSObject;
 
25
  
 
26
  if (fp.mode == "disabled")
 
27
          document.documentElement.openSubDialog("chrome://browser/content/preferences/connection.xul", "", null);
 
28
        else {
 
29
                var win = foxyproxy_common.getMostRecentWindow();
 
30
                if (win && win.foxyproxy)
 
31
                  win.foxyproxy.onOptionsDialog();
 
32
                else {
 
33
                  alert("FoxyProxy Error");
 
34
                  document.documentElement.openSubDialog("chrome://browser/content/preferences/connection.xul", "", null);                
 
35
                }
 
36
        }
 
37
}