markphip
markphip
PD🧩 Plasmo Developers
Created by markphip on 9/13/2023 in #👟framework
content.tsx only consistently works if refresh page
I notice on the pages that are worst offenders, GitHub is just doing an XHR fetch so it is behaving like a SPA. Any pointers on how to detect the page changes and establish an inline anchor in this scenario? If I add a console.log(el) in my code where I query to add the anchor, I can see it being called over and over and returning null when it does not work. As a side note, I notice when it does find content it still is called over and over. Is this normal behavior or am I supposed to be doing something to stop once it finds where to insert code?
2 replies