mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 1090313 - Only prompt desktopMode users to report issues for webfacing urls. r=margaret
This commit is contained in:
parent
b26432a3ec
commit
58b8b3f705
@ -39,7 +39,8 @@ var WebcompatReporter = {
|
||||
} else if (topic === "DesktopMode:Change") {
|
||||
let args = JSON.parse(data);
|
||||
let tab = BrowserApp.getTabForId(args.tabId);
|
||||
if (args.desktopMode && tab !== null) {
|
||||
let currentURI = tab.browser.currentURI.spec;
|
||||
if (args.desktopMode && this.isReportableUrl(currentURI)) {
|
||||
this.reportDesktopModePrompt();
|
||||
}
|
||||
}
|
||||
@ -57,10 +58,10 @@ var WebcompatReporter = {
|
||||
},
|
||||
|
||||
isReportableUrl: function(url) {
|
||||
return url !== null && !(url.startsWith("about") ||
|
||||
url.startsWith("chrome") ||
|
||||
url.startsWith("file") ||
|
||||
url.startsWith("resource"));
|
||||
return url && !(url.startsWith("about") ||
|
||||
url.startsWith("chrome") ||
|
||||
url.startsWith("file") ||
|
||||
url.startsWith("resource"));
|
||||
},
|
||||
|
||||
reportDesktopModePrompt: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user