Skip to content
Browse files

Issue 5738 (Firebug help links should be https:)

  • Loading branch information...
1 parent bbc65b9 commit 8bc0ed74f24eca3e5ee8d06c721ba81ce91de59e @SebastianZ SebastianZ committed with janodvarko Jul 22, 2012
View
31 extension/content/firebug/chrome/chrome.js
@@ -17,7 +17,7 @@ define([
"firebug/lib/events",
"firebug/js/fbs",
"firebug/chrome/window",
- "firebug/lib/options",
+ "firebug/lib/options"
],
function chromeFactory(Obj, Firefox, Dom, Css, System, Menu, Toolbar, Url, Locale, String,
Events, FBS, Win, Options) {
@@ -39,6 +39,21 @@ const LOAD_FLAGS_NONE = nsIWebNavigation.LOAD_FLAGS_NONE;
const panelURL = "chrome://firebug/content/panel.html";
+// URLs used in the Firebug Menu and several other places
+const firebugURLs =
+{
+ main: "https://getfirebug.com",
+ help: "https://getfirebug.com/help",
+ FAQ: "https://getfirebug.com/wiki/index.php/FAQ",
+ docs: "https://getfirebug.com/docs.html",
+ keyboard: "https://getfirebug.com/wiki/index.php/Keyboard_and_Mouse_Shortcuts",
+ discuss: "https://groups.google.com/forum/#!forum/firebug",
+ issues: "http://code.google.com/p/fbug/issues/list?can=1",
+ donate: "https://getfirebug.com/getinvolved",
+ extensions: "https://getfirebug.com/wiki/index.php/Firebug_Extensions",
+ issue5110: "http://code.google.com/p/fbug/issues/detail?id=5110"
+};
+
const statusCropSize = 20;
// ********************************************************************************************* //
@@ -1715,6 +1730,20 @@ var FirebugChrome =
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ visitWebsite: function(which, arg)
+ {
+ var url = firebugURLs[which];
+ if (url)
+ {
+ if (arg)
+ url += arg;
+
+ Win.openNewTab(url);
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main Toolbar
appendToolbarButton: function(button, before)
View
18 extension/content/firebug/firebug.js
@@ -43,19 +43,6 @@ const versionURL = "chrome://firebug/content/branch.properties";
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-const firebugURLs = // TODO chrome.js
-{
- main: "http://www.getfirebug.com",
- help: "http://www.getfirebug.com/help",
- FAQ: "http://getfirebug.com/wiki/index.php/FAQ",
- docs: "http://www.getfirebug.com/docs.html",
- keyboard: "http://getfirebug.com/wiki/index.php/Keyboard_and_Mouse_Shortcuts",
- discuss: "http://groups.google.com/group/firebug",
- issues: "http://code.google.com/p/fbug/issues/list",
- donate: "http://getfirebug.com/getinvolved",
- issue5110: "http://code.google.com/p/fbug/issues/detail?id=5110"
-};
-
const scriptBlockSize = 20;
const PLACEMENT_NONE = 0;
@@ -1298,11 +1285,6 @@ window.Firebug =
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
- visitWebsite: function(which)
- {
- Win.openNewTab(firebugURLs[which]);
- },
-
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// nsISupports
View
48 extension/content/firebug/firefox/browserOverlay.js
@@ -11,21 +11,9 @@ Cu.import("resource://firebug/fbtrace.js");
Cu.import("resource://firebug/loader.js");
Cu.import("resource://firebug/prefLoader.js");
-var Locale = Cu.import("resource://firebug/locale.js").Locale;
+const firstRunPage = "https://getfirebug.com/firstrun#Firebug ";
-// Firebug URLs used by the global menu.
-var firebugURLs =
-{
- main: "http://www.getfirebug.com",
- FAQ: "http://getfirebug.com/wiki/index.php/FAQ",
- docs: "http://www.getfirebug.com/docs.html",
- keyboard: "http://getfirebug.com/wiki/index.php/Keyboard_and_Mouse_Shortcuts",
- discuss: "https://groups.google.com/forum/#!forum/firebug",
- issues: "http://code.google.com/p/fbug/issues/list",
- donate: "http://getfirebug.com/getinvolved",
- extensions: "http://getfirebug.com/wiki/index.php/Firebug_Extensions",
- firstRunPage: "http://getfirebug.com/firstrun#Firebug "
-};
+var Locale = Cu.import("resource://firebug/locale.js").Locale;
// ********************************************************************************************* //
// String Bundles
@@ -321,7 +309,7 @@ Firebug.GlobalUI =
var container = $("appcontent");
- // List of Firbug scripts that must be loaded into the global scope (browser.xul)
+ // List of Firebug scripts that must be loaded into the global scope (browser.xul)
var scriptSources = [
"chrome://firebug/content/trace.js",
"chrome://firebug/content/legacy.js",
@@ -517,14 +505,11 @@ Firebug.GlobalUI =
});
},
- visitWebsite: function(which, arg)
+ openFirstRunPage: function()
{
- var url = firebugURLs[which];
- if (url)
- {
- url = arg ? url + arg : url;
- gBrowser.selectedTab = gBrowser.addTab(url, null, null, null);
- }
+ var version = Firebug.GlobalUI.getVersion();
+ url = firstRunPage + version;
+ gBrowser.selectedTab = gBrowser.addTab(url, null, null, null);
},
setPosition: function(newPosition)
@@ -948,15 +933,15 @@ var firebugMenuContent = [
id: "menu_firebug_firebugUrlWebsite",
label: "firebug.Website",
tooltiptext: "firebug.menu.tip.Website",
- oncommand: "Firebug.GlobalUI.visitWebsite('main')",
+ oncommand: "Firebug.chrome.visitWebsite('main')",
"class": "fbInternational"
}),
$menuitem(
{
id: "menu_firebug_firebugUrlExtensions",
label: "firebug.menu.Extensions",
tooltiptext: "firebug.menu.tip.Extensions",
- oncommand: "Firebug.GlobalUI.visitWebsite('extensions')",
+ oncommand: "Firebug.chrome.visitWebsite('extensions')",
"class": "fbInternational"
}),
$menuitem(
@@ -973,39 +958,39 @@ var firebugMenuContent = [
id: "menu_firebug_firebugDoc",
label: "firebug.Documentation",
tooltiptext: "firebug.menu.tip.Documentation",
- oncommand: "Firebug.GlobalUI.visitWebsite('docs')",
+ oncommand: "Firebug.chrome.visitWebsite('docs')",
"class": "fbInternational"
}),
$menuitem(
{
id: "menu_firebug_firebugKeyboard",
label: "firebug.KeyShortcuts",
tooltiptext: "firebug.menu.tip.Key_Shortcuts",
- oncommand: "Firebug.GlobalUI.visitWebsite('keyboard')",
+ oncommand: "Firebug.chrome.visitWebsite('keyboard')",
"class": "fbInternational"
}),
$menuitem(
{
id: "menu_firebug_firebugForums",
label: "firebug.Forums",
tooltiptext: "firebug.menu.tip.Forums",
- oncommand: "Firebug.GlobalUI.visitWebsite('discuss')",
+ oncommand: "Firebug.chrome.visitWebsite('discuss')",
"class": "fbInternational"
}),
$menuitem(
{
id: "menu_firebug_firebugIssues",
label: "firebug.Issues",
tooltiptext: "firebug.menu.tip.Issues",
- oncommand: "Firebug.GlobalUI.visitWebsite('issues')",
+ oncommand: "Firebug.chrome.visitWebsite('issues')",
"class": "fbInternational"
}),
$menuitem(
{
id: "menu_firebug_firebugDonate",
label: "firebug.Donate",
tooltiptext: "firebug.menu.tip.Donate",
- oncommand: "Firebug.GlobalUI.visitWebsite('donate')",
+ oncommand: "Firebug.chrome.visitWebsite('donate')",
"class": "fbInternational"
}),
])
@@ -1209,9 +1194,7 @@ if ((!$("firebug-button") || $("firebug-button").parentNode.tagName == "toolbarp
// Check whether insertItem really works
var curSet = navBar.currentSet.split(",");
if (curSet.indexOf(startButtonId) == -1)
- {
FBTrace.sysout("Startbutton; navBar.insertItem doesn't work", curSet);
- }
if (FBTrace.DBG_INITIALIZE)
FBTrace.sysout("Startbutton; curSet (after modification): " + navBar.currentSet);
@@ -1274,8 +1257,7 @@ if (checkFirebugVersion(PrefLoader.getPref("currentVersion")) > 0)
if (window.closed)
return;
- var version = Firebug.GlobalUI.getVersion();
- Firebug.GlobalUI.visitWebsite("firstRunPage", version);
+ Firebug.GlobalUI.openFirstRunPage();
}, 1000);
window.addEventListener("unload", function()
View
2 extension/content/firebug/firefox/firebugMenuOverlay.xul
@@ -71,7 +71,7 @@
<command id="cmd_firebug_toggleCommandPopup" oncommand="Firebug.CommandLine.Popup.toggle(Firebug.currentContext)"
checked="false"/>
- <command id="cmd_firebug_openHelp" oncommand="Firebug.visitWebsite('help');"/>
+ <command id="cmd_firebug_openHelp" oncommand="Firebug.chrome.visitWebsite('help');"/>
<command id="cmd_firebug_openInEditor" oncommand="Firebug.ExternalEditors.onContextMenuCommand(event);"/>
</commandset>
View
2 extension/content/firebug/js/scriptPanel.js
@@ -1946,7 +1946,7 @@ Firebug.ScriptPanel.WarningRep = domplate(Firebug.Rep,
var box = this.tag.replace(args, parentNode, this);
var description = box.getElementsByClassName("disabledPanelDescription").item(0);
FirebugReps.Description.render(args.suggestion, description,
- Obj.bindFixed(Firebug.visitWebsite, this, "issue5110"));
+ Obj.bindFixed(Firebug.chrome.visitWebsite, this, "issue5110"));
return box;
},

0 comments on commit 8bc0ed7

Please sign in to comment.
Something went wrong with that request. Please try again.