-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clients(extension): firefox #10332
clients(extension): firefox #10332
Changes from 3 commits
6714c38
954e52e
a4bb1f2
405462f
c1bbfce
8b93709
6a7b673
5e3ad1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"browserBrand": { | ||
"message": "chrome" | ||
}, | ||
"localhostErrorMessage": { | ||
"message": "Use DevTools to audit pages on localhost." | ||
} | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"browserBrand": { | ||
"message": "firefox" | ||
}, | ||
"localhostErrorMessage": { | ||
"message": "Use the Lighthouse Node CLI to audit pages on localhost." | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ const SettingsController = require('./settings-controller.js'); | |
const VIEWER_URL = 'https://googlechrome.github.io/lighthouse/viewer/'; | ||
const optionsVisibleClass = 'main--options-visible'; | ||
|
||
const STRINGS = { | ||
localhostErrorMessage: chrome.i18n.getMessage('localhostErrorMessage'), | ||
exterkamp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
/** | ||
* Guaranteed context.querySelector. Always returns an element or throws if | ||
* nothing matches query. | ||
|
@@ -120,7 +124,7 @@ function getSiteUrl() { | |
|
||
const url = new URL(tabs[0].url); | ||
if (url.hostname === 'localhost') { | ||
reject(new Error('Use DevTools to audit pages on localhost.')); | ||
reject(new Error(STRINGS.localhostErrorMessage)); | ||
} else if (/^(chrome|about)/.test(url.protocol)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any firefox specific urls we need to include here now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
reject(new Error(`Cannot audit ${url.protocol}// pages.`)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Firefox, |
||
} else { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,7 +140,7 @@ npm publish | |
# Publish viewer. | ||
yarn deploy-viewer | ||
|
||
# Publish the extension (if it changed). | ||
# Publish the extensions (if it changed). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there firefox specific instructions so that someone can release this? Or will that be handled in a follow up once this has landed and can be released for the first time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't uploaded to the FF store before, so IDK. I'll update when I do. |
||
open https://chrome.google.com/webstore/developer/edit/blipmdconlkpinefehnmjammfjpmpbjk | ||
cd dist/extension-package/ | ||
echo "Upload the package zip to CWS dev dashboard..." | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is simpler to use. just always package.