import cssText from "data-text:~contents/style.css"
import type { PlasmoCSConfig, PlasmoGetInlineAnchorList } from "plasmo"
import { useEffect, useState } from "react"
export const config: PlasmoCSConfig = {
matches: ["https://www.youtube.com/"]
}
export const getStyle = () => {
const style = document.createElement("style")
style.textContent = cssText
return style
}
export const getInlineAnchorList: PlasmoGetInlineAnchorList = async () =>
document.querySelectorAll("a#thumbnail.ytd-thumbnail")
const HomePage = ({ anchor }) => {
return (
<button className="home-button-position">
...
</button>
)
}
export default HomePage
import cssText from "data-text:~contents/style.css"
import type { PlasmoCSConfig, PlasmoGetInlineAnchorList } from "plasmo"
import { useEffect, useState } from "react"
export const config: PlasmoCSConfig = {
matches: ["https://www.youtube.com/"]
}
export const getStyle = () => {
const style = document.createElement("style")
style.textContent = cssText
return style
}
export const getInlineAnchorList: PlasmoGetInlineAnchorList = async () =>
document.querySelectorAll("a#thumbnail.ytd-thumbnail")
const HomePage = ({ anchor }) => {
return (
<button className="home-button-position">
...
</button>
)
}
export default HomePage