mywot / firefox-xul

WOT's current XUL-based Firefox extension
http://www.mywot.com/wiki/Firefox
GNU General Public License v3.0
2 stars 8 forks source link

Detect HTTPS Everywhere and default to HTTPS if installed #10

Closed samitolvanen closed 12 years ago

samitolvanen commented 12 years ago

If HTTP Everywhere is installed, it will break all non-HTTPS XMLHttpRequests from other add-ons. Therefore, detect the presence of HTTP Everywhere and always use HTTPS for API requests if it's installed.

You can check whether HTTPS Everywhere is installed with the following method and then default to HTTPS to fix the issue:

"They should be able to try the following:

var https_everywhere =
    Components.classes["@eff.org/https-everywhere;1"]
        .getService(Components.interfaces.nsISupports).wrappedJSObject;

If that does not raise an exception, HTTPS Everywhere is installed."

sorgoz commented 12 years ago

done