MCPcopy Create free account
hub / github.com/027xiguapi/code-box / getOverlayAnchorList

Function getOverlayAnchorList

contents/copycode.tsx:54–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52// document.querySelectorAll("pre")
53
54export const getOverlayAnchorList: PlasmoGetOverlayAnchorList = async () => {
55 const preList = document.querySelectorAll("pre")
56
57 const anchors = [] as any
58 Array.from(preList).map((pre) => {
59 const classList = pre.classList
60 if (pre.textContent && !classList.contains("CodeMirror-line"))
61 anchors.push(pre)
62 })
63
64 return anchors
65}
66
67const PlasmoOverlay: FC<PlasmoCSUIProps> = ({ anchor }) => {
68 const [copyCode] = useStorage("config-copyCode", true)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected