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

Fix: theme toggle each time content script is loaded #835

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pages/content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@extension/shared": "workspace:*",
"@extension/storage": "workspace:*"
"@extension/shared": "workspace:*"
},
"devDependencies": {
"@extension/hmr": "workspace:*",
Expand Down
5 changes: 3 additions & 2 deletions pages/content/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { toggleTheme } from '@src/toggleTheme';
import { sampleFunction } from '@src/sampleFunction';

console.log('content script loaded');

void toggleTheme();
// Shows how to call a function defined in another module
sampleFunction();
3 changes: 3 additions & 0 deletions pages/content/src/sampleFunction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function sampleFunction() {
console.log('content script - sampleFunction() called from another module');
}
7 changes: 0 additions & 7 deletions pages/content/src/toggleTheme.ts

This file was deleted.

9 changes: 3 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading