[Pkg-mozext-commits] [firetray] 16/38: Default protocol to http in openBrowserWindow().
David Prévot
taffit at moszumanska.debian.org
Mon Apr 6 15:58:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firetray.
commit 3316aee35508ea8cea3b6683fe9288275997d7c0
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Mon Feb 16 00:59:05 2015 +0100
Default protocol to http in openBrowserWindow().
---
src/modules/FiretrayHandler.jsm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/modules/FiretrayHandler.jsm b/src/modules/FiretrayHandler.jsm
index 7c14b02..88d3c73 100644
--- a/src/modules/FiretrayHandler.jsm
+++ b/src/modules/FiretrayHandler.jsm
@@ -438,8 +438,14 @@ firetray.Handler = {
Components.interfaces.nsIPrefLocalizedString).data;
} catch (e) {}
- // use this if we can't find the pref
- if (!url) {
+ if (url) {
+ try {
+ Services.io.newURI(url, null, null);
+ } catch (e) {
+ url = "http://" + url;
+ }
+ }
+ else {
var SBS = Cc["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);
var configBundle = SBS.createBundle(firetray.Handler._getBrowserProperties());
url = configBundle.GetStringFromName(prefDomain);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git
More information about the Pkg-mozext-commits
mailing list