jonah
PD🧩 Plasmo Developers
•Created by jonah on 6/12/2024 in #👾extension
Storage API syncing
Hi there, I was wondering if there was any information on getting the storage API to work with cross browser syncing (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/sync).
1 replies
PD🧩 Plasmo Developers
•Created by jonah on 7/21/2023 in #👾extension
Modifying HttpOnly cookies
There is a specific cookie that I am trying to extend the expiration date of, but I can't figure out how to modify it. At first, I tried modifying it with a
content.ts
file that edits the document.cookies
, but that doesn't include httpOnly cookies. I then made a BSGW and tried to use the webReqeuest API to listen to the onHeadersReceived event, but that also doesn't include the set-cookie headers. Does anyone have any ideas on how to go about doing this?1 replies
PD🧩 Plasmo Developers
•Created by jonah on 6/20/2023 in #👟framework
Offscreen + Messaging API issue
Hello, I am trying to create an offscreen document for copying text to clipboard. I am trying to follow some of the examples I found in this issue: https://github.com/PlasmoHQ/plasmo/issues/527.
In my
background.ts
file, I am trying to send a message to my offscreen.ts
file like this:
this is the offscreen.ts file:
Heres my offscreen.html:
But, when I try this, I get this error:
Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
Which I'm guessing means it can't find the message handler.
Am I supposed to put the message handler in a different place or create the offscreen document in a different file? I would really appreciate if someone could help me fix this.28 replies
PD🧩 Plasmo Developers
•Created by jonah on 6/14/2023 in #👾extension
Document is not defined on chrome mv3 in a background.ts file
Hello, I have created a context menu that copies something to your clipboard. This is the function I'm using:
This works fine with firefox but not on chrome. So, is there a better way to add a string to the users clipboard via a context menu listener event that works with chrome mv3?
70 replies
PD🧩 Plasmo Developers
•Created by jonah on 12/27/2022 in #👟framework
onInstalled event with Plasmo
Hi! Is it possible to use the
runtime.onInstalled
event with Plasmo?4 replies
PD🧩 Plasmo Developers
•Created by jonah on 12/24/2022 in #👟framework
Best way to store JSON with storage API
Hello 😁 ! I am going to store some configuration data (in JSON) using the storage API. I am wondering what is the best way to do it using the
usestorage
hook. I was thinking of somehow using the onInit
argument to parse the JSON but I'm not sure if that will work.13 replies