Skip to content
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

feat: Allow passing custom preferences to chrome, enabling dev mode on chrome://extensions and allowing content script sourcemaps automatically #384

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

aklinker1
Copy link
Collaborator

@aklinker1 aklinker1 commented Jan 29, 2024

This fixes the dev mode issue in #236 and closes #137!

See the JS docs for example config:

wxt/src/types/external.ts

Lines 677 to 703 in 731dae7

/**
* An map of chrome preferences from https://chromium.googlesource.com/chromium/src/+/main/chrome/common/pref_names.h
*
* @example
* // change your downloads directory
* {
* download: {
* default_directory: "/my/custom/dir",
* },
* }
*
* @default
* // Enable dev mode and allow content script sourcemaps
* {
* devtools: {
* synced_preferences_sync_disabled: {
* skipContentScripts: false,
* },
* }
* extensions: {
* ui: {
* developer_mode: true,
* },
* }
* }
*/
chromiumPref?: string;

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit f5de267
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/65b8026b06cdec0008f19fa3
😎 Deploy Preview https://deploy-preview-384--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (98d2792) 79.87% compared to head (f5de267) 80.14%.

Files Patch % Lines
src/core/runners/web-ext.ts 75.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #384      +/-   ##
==========================================
+ Coverage   79.87%   80.14%   +0.27%     
==========================================
  Files         104      104              
  Lines        7556     7599      +43     
  Branches      677      680       +3     
==========================================
+ Hits         6035     6090      +55     
+ Misses       1505     1493      -12     
  Partials       16       16              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aklinker1 aklinker1 changed the title feat: Allow passing preferences to chrome, enable dev mode and conten… feat: Allow passing preferences to chrome, enable dev mode and content script sourcemaps Jan 29, 2024
@aklinker1 aklinker1 changed the title feat: Allow passing preferences to chrome, enable dev mode and content script sourcemaps feat: Allow passing custom preferences to chrome, enable dev mode on chrome://extensions and content script sourcemaps automatically Jan 29, 2024
@aklinker1 aklinker1 marked this pull request as ready for review January 29, 2024 19:55
@aklinker1 aklinker1 changed the title feat: Allow passing custom preferences to chrome, enable dev mode on chrome://extensions and content script sourcemaps automatically feat: Allow passing custom preferences to chrome, enabling dev mode on chrome://extensions and allowing content script sourcemaps automatically Jan 29, 2024
@aklinker1 aklinker1 merged commit dd7abdd into main Jan 29, 2024
17 checks passed
@aklinker1 aklinker1 deleted the chrome-launcher-prefs branch January 29, 2024 19:58
@pftom
Copy link

pftom commented May 30, 2024

@aklinker1 why chromiumPref is just string types with object assign values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable extension developer setting in Chrome automatically in dev mode
2 participants