Bug 1165050 - Make deprecation warnings in viewSource.js point to the right URL for documentation. r=jryans.

--HG--
extra : rebase_source : 309d68cd40fb8417d0c70b07c994c2cbb44f6ec9
This commit is contained in:
Mike Conley 2015-05-15 11:40:49 -04:00
Родитель f5c3435326
Коммит 1b74ef628f
1 изменённых файлов: 13 добавлений и 13 удалений

Просмотреть файл

@ -328,7 +328,7 @@ let ViewSourceChrome = {
_loadViewSourceDeprecated() { _loadViewSourceDeprecated() {
Deprecated.warning("The arguments you're passing to viewSource.xul " + Deprecated.warning("The arguments you're passing to viewSource.xul " +
"are using an out-of-date API.", "are using an out-of-date API.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
// Parse the 'arguments' supplied with the dialog. // Parse the 'arguments' supplied with the dialog.
// arg[0] - URL string. // arg[0] - URL string.
// arg[1] - Charset value in the form 'charset=xxx'. // arg[1] - Charset value in the form 'charset=xxx'.
@ -844,35 +844,35 @@ function ViewSourceSavePage()
this.__defineGetter__("gLastLineFound", function () { this.__defineGetter__("gLastLineFound", function () {
Deprecated.warning("gLastLineFound is deprecated - please use " + Deprecated.warning("gLastLineFound is deprecated - please use " +
"ViewSourceChrome.lastLineFound instead.", "ViewSourceChrome.lastLineFound instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
return ViewSourceChrome.lastLineFound; return ViewSourceChrome.lastLineFound;
}); });
function onLoadViewSource() { function onLoadViewSource() {
Deprecated.warning("onLoadViewSource() is deprecated - please use " + Deprecated.warning("onLoadViewSource() is deprecated - please use " +
"ViewSourceChrome.onXULLoaded() instead.", "ViewSourceChrome.onXULLoaded() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.onXULLoaded(); ViewSourceChrome.onXULLoaded();
} }
function isHistoryEnabled() { function isHistoryEnabled() {
Deprecated.warning("isHistoryEnabled() is deprecated - please use " + Deprecated.warning("isHistoryEnabled() is deprecated - please use " +
"ViewSourceChrome.historyEnabled instead.", "ViewSourceChrome.historyEnabled instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
return ViewSourceChrome.historyEnabled; return ViewSourceChrome.historyEnabled;
} }
function ViewSourceClose() { function ViewSourceClose() {
Deprecated.warning("ViewSourceClose() is deprecated - please use " + Deprecated.warning("ViewSourceClose() is deprecated - please use " +
"ViewSourceChrome.close() instead.", "ViewSourceChrome.close() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.close(); ViewSourceChrome.close();
} }
function ViewSourceReload() { function ViewSourceReload() {
Deprecated.warning("ViewSourceReload() is deprecated - please use " + Deprecated.warning("ViewSourceReload() is deprecated - please use " +
"ViewSourceChrome.reload() instead.", "ViewSourceChrome.reload() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.reload(); ViewSourceChrome.reload();
} }
@ -880,7 +880,7 @@ function getWebNavigation()
{ {
Deprecated.warning("getWebNavigation() is deprecated - please use " + Deprecated.warning("getWebNavigation() is deprecated - please use " +
"ViewSourceChrome.webNav instead.", "ViewSourceChrome.webNav instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
// The original implementation returned null if anything threw during // The original implementation returned null if anything threw during
// the getting of the webNavigation. // the getting of the webNavigation.
try { try {
@ -893,7 +893,7 @@ function getWebNavigation()
function viewSource(url) { function viewSource(url) {
Deprecated.warning("viewSource() is deprecated - please use " + Deprecated.warning("viewSource() is deprecated - please use " +
"ViewSourceChrome.loadURL() instead.", "ViewSourceChrome.loadURL() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.loadURL(url); ViewSourceChrome.loadURL(url);
} }
@ -901,7 +901,7 @@ function ViewSourceGoToLine()
{ {
Deprecated.warning("ViewSourceGoToLine() is deprecated - please use " + Deprecated.warning("ViewSourceGoToLine() is deprecated - please use " +
"ViewSourceChrome.promptAndGoToLine() instead.", "ViewSourceChrome.promptAndGoToLine() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.promptAndGoToLine(); ViewSourceChrome.promptAndGoToLine();
} }
@ -909,27 +909,27 @@ function goToLine(line)
{ {
Deprecated.warning("goToLine() is deprecated - please use " + Deprecated.warning("goToLine() is deprecated - please use " +
"ViewSourceChrome.goToLine() instead.", "ViewSourceChrome.goToLine() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.goToLine(line); ViewSourceChrome.goToLine(line);
} }
function BrowserForward(aEvent) { function BrowserForward(aEvent) {
Deprecated.warning("BrowserForward() is deprecated - please use " + Deprecated.warning("BrowserForward() is deprecated - please use " +
"ViewSourceChrome.goForward() instead.", "ViewSourceChrome.goForward() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.goForward(); ViewSourceChrome.goForward();
} }
function BrowserBack(aEvent) { function BrowserBack(aEvent) {
Deprecated.warning("BrowserBack() is deprecated - please use " + Deprecated.warning("BrowserBack() is deprecated - please use " +
"ViewSourceChrome.goBack() instead.", "ViewSourceChrome.goBack() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.goBack(); ViewSourceChrome.goBack();
} }
function UpdateBackForwardCommands() { function UpdateBackForwardCommands() {
Deprecated.warning("UpdateBackForwardCommands() is deprecated - please use " + Deprecated.warning("UpdateBackForwardCommands() is deprecated - please use " +
"ViewSourceChrome.updateCommands() instead.", "ViewSourceChrome.updateCommands() instead.",
"https://developer.mozilla.org/en-US/Add-ons/Code_snippets/ViewSource"); "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
ViewSourceChrome.updateCommands(); ViewSourceChrome.updateCommands();
} }