5343430c0f
BREAKING CHANGES: Several APIs/options have been renamed:
- `type: "inline" | "overlay" | "modal"` has been changed to `position: "inline" | "overlay" | "modal"`
- `createContentScriptUi({ ... })` → `createShadowRootUi({ ... })`
- `createContentScriptIframe({ ... })` → `createIframeUi({ ... })`
- `onRemove` is now called ***before*** the UI is removed from the DOM, previously it was called after the UI was removed
14 lines
291 B
TypeScript
14 lines
291 B
TypeScript
export default defineContentScript({
|
|
matches: ['*://*.google.com/*'],
|
|
|
|
main(ctx) {
|
|
const ui = createIframeUi(ctx, {
|
|
page: '/iframe-src.html',
|
|
position: 'overlay',
|
|
anchor: 'form[action="/search"]',
|
|
});
|
|
ui.mount();
|
|
console.log('Mounted iframe');
|
|
},
|
|
});
|