зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1157682 - ignore querystring / hash when determining 'home page' for reader mode, r=margaret
--HG-- extra : rebase_source : e600d13390e1f36a009d4a8e31fc9d594e7c27b5
This commit is contained in:
Родитель
7f9da983fa
Коммит
46f3b97701
|
@ -240,13 +240,19 @@ this.ReaderMode = {
|
|||
},
|
||||
|
||||
_shouldCheckUri: function (uri) {
|
||||
if ((uri.prePath + "/") === uri.spec) {
|
||||
this.log("Not parsing home page: " + uri.spec);
|
||||
if (!(uri.schemeIs("http") || uri.schemeIs("https") || uri.schemeIs("file"))) {
|
||||
this.log("Not parsing URI scheme: " + uri.scheme);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(uri.schemeIs("http") || uri.schemeIs("https") || uri.schemeIs("file"))) {
|
||||
this.log("Not parsing URI scheme: " + uri.scheme);
|
||||
try {
|
||||
uri.QueryInterface(Ci.nsIURL);
|
||||
} catch (ex) {
|
||||
// If this doesn't work, presumably the URL is not well-formed or something
|
||||
return false;
|
||||
}
|
||||
if (!uri.filePath || uri.filePath == "/") {
|
||||
this.log("Not parsing home page: " + uri.spec);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче