Skip to content

Commit 44a3edb

Browse files
committed
connect to the ui comtent items to example.com
1 parent 646ca49 commit 44a3edb

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎packages/wxt-demo/src/entrypoints/automount.content/index.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import 'uno.css';
22
import './style.css';
33

44
export default defineContentScript({
5-
matches: ['https://*.duckduckgo.com/*'],
5+
matches: ['https://example.com/*'],
66
cssInjectionMode: 'manifest',
77

88
async main(ctx) {
99
const dynamicUI = createIntegratedUi(ctx, {
1010
position: 'inline',
1111
append: 'after',
12-
anchor: 'form[role=search]',
12+
anchor: 'div',
1313
onMount: (container) => {
1414
const app = document.createElement('div');
1515
container.id = 'automount-anchor';
@@ -54,7 +54,7 @@ export default defineContentScript({
5454
const stopAutoMountButton = createIntegratedUi(ctx, {
5555
position: 'inline',
5656
append: 'last',
57-
anchor: 'form[role=search]',
57+
anchor: 'div',
5858
onMount: (container) => {
5959
const app = document.createElement('button');
6060
container.classList.add('flex', 'flex-justify-center');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
:root {
2-
color-scheme: dark;
2+
color-scheme: light;
33
}

‎packages/wxt-demo/src/entrypoints/ui.content/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import './style.css';
33
import manualStyle from './manual-style.css?inline';
44

55
export default defineContentScript({
6-
matches: ['https://*.duckduckgo.com/*'],
6+
matches: ['https://example.com/*'],
77
cssInjectionMode: 'ui',
88

99
async main(ctx) {
@@ -15,7 +15,7 @@ export default defineContentScript({
1515
name: 'demo-ui',
1616
position: 'inline',
1717
append: 'before',
18-
anchor: 'form[role=search]',
18+
anchor: 'div',
1919
onMount: (container) => {
2020
const app = document.createElement('div');
2121
app.classList.add('m-4', 'text-red-500');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
body {
22
padding: 2rem;
3-
background-color: blanchedalmond;
3+
background-color: white;
44
}

0 commit comments

Comments
 (0)