зеркало из https://github.com/mozilla/gecko-dev.git
Bug 969835 - "Don't check for HelperApps on about: and chrome: URLs" [r=lucasr.at.mozilla]
This commit is contained in:
Родитель
e7b1974dc1
Коммит
9433656b7d
|
@ -3793,8 +3793,9 @@ Tab.prototype = {
|
|||
}
|
||||
|
||||
// Show page actions for helper apps.
|
||||
if (BrowserApp.selectedTab == this)
|
||||
ExternalApps.updatePageAction(this.browser.currentURI);
|
||||
let uri = this.browser.currentURI;
|
||||
if (BrowserApp.selectedTab == this && ExternalApps.shouldCheckUri(uri))
|
||||
ExternalApps.updatePageAction(uri);
|
||||
|
||||
if (!Reader.isEnabledForParseOnLoad)
|
||||
return;
|
||||
|
@ -3803,7 +3804,7 @@ Tab.prototype = {
|
|||
Reader.parseDocumentFromTab(this.id, function (article) {
|
||||
// Do nothing if there's no article or the page in this tab has
|
||||
// changed
|
||||
let tabURL = this.browser.currentURI.specIgnoringRef;
|
||||
let tabURL = uri.specIgnoringRef;
|
||||
if (article == null || (article.url != tabURL)) {
|
||||
// Don't clear the article for about:reader pages since we want to
|
||||
// use the article from the previous page
|
||||
|
@ -8007,6 +8008,14 @@ var ExternalApps = {
|
|||
HelperApps.launchUri(uri);
|
||||
},
|
||||
|
||||
shouldCheckUri: function(uri) {
|
||||
if (!(uri.schemeIs("http") || uri.schemeIs("https") || uri.schemeIs("file"))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
updatePageAction: function updatePageAction(uri) {
|
||||
let apps = HelperApps.getAppsForUri(uri);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче