notdevkey
notdevkey
Explore posts from servers
PD🧩 Plasmo Developers
Created by notdevkey on 9/11/2023 in #👾extension
How do I access the current website URL from Plasmo popup?
Hey all, I'm trying to access the active tab URL from Plasmo popup. I'm already using storage and I need to store the url to have the extension disabled for the current website. How would I get the website URL using Plasmo?
4 replies
TTCTheo's Typesafe Cult
Created by notdevkey on 9/7/2023 in #questions
Getting "drawer.css.map" when accessing getServerSideProps context
This is so dumb. I'm using Next.js 13, and a very simple getServerSideProps function, which should get the user id from the page route. The file is /pages/admin/[user].tsx, and I'm accessing the param using ctx.params.user, but even when the route is, for example, <host>/admin/id1234, the ctx.params.user value is "drawer.css.map". Any ideas why this is happening?
2 replies
PD🧩 Plasmo Developers
Created by notdevkey on 8/30/2023 in #👾extension
How do I make a CSUI container fill the anchor's width and height?
Working on my first browser extension and ran into this issue - I want to have the CSUI container fill anchor's width and height, so I can then use much simpler CSS to position the contents of the CSUI container wherever I want across the anchor element. In my case, the anchor element is a simple textarea(I don't need to handle the case where the textarea gets resized).
2 replies
TTCTheo's Typesafe Cult
Created by notdevkey on 8/25/2023 in #questions
How does React Query cache values?
I am working on a Plasmo browser extension that uses WebSockets to communicate with the API. I really need to cache previous responses because I need to keep a 'history' of all values and update them on an event. I know there's tutorials out there, even RQ docs have a blogpost about how to do this(https://tkdodo.eu/blog/using-web-sockets-with-react-query). But it just feels ambiguous to use queryClient.setQueryData() to kind of force RQ to use some data. And even if so, then the most correct way of retrieving data would be to use queryClient.getQueryData(["key"]) instead of something cleaner like useQuery(["key"])(it's requires queryFn). I want to know how RQ does the caching, so I could implement something simpler of my own without overhead for this specific case. Should I try a different caching solution or implement my own? Can I use RQ?
7 replies