extension.js
extension.js copied to clipboard
Pass command line arguments to browser
For example I would like to pass a start/opening url to firefox.
When I try to pass an argument it looks like this:
npx extension dev --browser=firefox -- "https://en.wikipedia.org/" ►►► Downloading extension... URL https://en.wikipedia.org/ ►►► Unpackaging browser extension... PATH /home/jono/src/savr/ff-two/David_Bowie ERROR in Extension.js ✖︎✖︎✖︎ Failed to download or extract ZIP file. Error: ADM-ZIP: Invalid or unsupported zip format. No END header found at Object.INVALID_FORMAT (/home/jono/src/savr/ff-two/node_modules/adm-zip/util/errors.js:56:16) ...
you can try
npx extension dev --browser=firefox --starting-url="https://en.wikipedia.org/"
or via extension.config.js
/** @type {import('extension').FileConfig} */
module.exports = {
browser: {
chrome: {
startingUrl: 'https://en.wikipedia.org/'
}
}
}
you can try
npx extension dev --browser=firefox --starting-url="https://en.wikipedia.org/"
Interestingly this printed
npx extension dev --browser=firefox --starting-url="https://en.wikipedia.org/"
🧩 Extension.js 2.0.0-rc.23
Extension Name JJ Proxy Extension
Extension Version 1.0
Extension ID jj-proxy-extension@extension-js
►►► Using own starting URL https://en.wikipedia.org/.
but it then opened firefox without that url. just the blank start page.