Remove unused inline script
This commit is contained in:
parent
1a0c8b6687
commit
9277ea51af
|
|
@ -1,27 +0,0 @@
|
|||
import type { PlasmoCSConfig, PlasmoGetInlineAnchor } from "plasmo"
|
||||
|
||||
export const config: PlasmoCSConfig = {
|
||||
matches: ["<all_urls>"]
|
||||
}
|
||||
|
||||
export const getInlineAnchor: PlasmoGetInlineAnchor = () =>
|
||||
// document.querySelector(`[href="/#pricing"]`)
|
||||
document.querySelector(`.text-secondly`);
|
||||
|
||||
// Use this to optimize unmount lookups
|
||||
// export const getShadowHostId = () => "plasmo-inline-example-unique-id"
|
||||
|
||||
const PlasmoInline = () => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
borderRadius: 4,
|
||||
padding: 4,
|
||||
background: "pink"
|
||||
}}>
|
||||
CSUI INLINE
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default PlasmoInline
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
import type { PlasmoCSConfig, PlasmoGetInlineAnchor } from "plasmo"
|
||||
import { sendToBackground } from "@plasmohq/messaging"
|
||||
|
||||
export const config: PlasmoCSConfig = {
|
||||
matches: ["<all_urls>"]
|
||||
}
|
||||
|
||||
export const getInlineAnchor: PlasmoGetInlineAnchor = () =>
|
||||
// document.querySelector(`[href="/#pricing"]`)
|
||||
document.querySelector(`.pgc-space-follow-page`);
|
||||
|
||||
// Use this to optimize unmount lookups
|
||||
// export const getShadowHostId = () => "plasmo-inline-example-unique-id"
|
||||
|
||||
const PlasmoInline = () => {
|
||||
const onClick = () => {
|
||||
const resp = sendToBackground({
|
||||
name: "test",
|
||||
body: {
|
||||
id: 123
|
||||
}
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
borderRadius: 4,
|
||||
padding: 4,
|
||||
background: "pink"
|
||||
}}
|
||||
onClick={onClick}
|
||||
>
|
||||
CSUI INLINE
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default PlasmoInline
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
import type { PlasmoCSConfig } from "plasmo"
|
||||
|
||||
export const config: PlasmoCSConfig = {
|
||||
matches: ["<all_urls>"],
|
||||
world: "MAIN"
|
||||
}
|
||||
|
||||
// export {}
|
||||
console.log(
|
||||
"You may find that having is not so pleasing a thing as wanting. This is not logical, but it is often true."
|
||||
)
|
||||
|
||||
const defaultFetch = window.fetch;
|
||||
|
||||
|
||||
window.fetch = (...args) => {
|
||||
console.log(args);
|
||||
|
||||
return defaultFetch(...args);
|
||||
}
|
||||
|
||||
console.log(fetch);
|
||||
Loading…
Reference in New Issue