luka
luka
PD🧩 Plasmo Developers
Created by luka on 4/16/2024 in #👾extension
local storage dev tools plasmo
Hi all, I am trying to locate the storage api data. I am aware the data is stored in chrome.storage and I tried going to the devtools to get the data. However, I am not able to get the data set in chrome.storage why?. In the extension console I have tried getting it with: await chrome.storage.local.get(console.log); but I cannot find it there. I am storing the data by just setting a key like storage.set('123','value'). Is there some way to see the storage api in dev tools?.
2 replies
PD🧩 Plasmo Developers
Created by luka on 4/2/2024 in #🔰newbie
Getting a 403 when deploying using plasmo plus
Hi there, we are using plasmo to deploy to multiple stores, I started with deploying to chrome but I am getting 403 after following the steps and adding all creds into the plasmo web app. I am getting this:
Errored - chrome: Step 1) Item ""[ext-id]" (Name browser plugin)": Response code 403 (Forbidden)
Errored - chrome: Step 1) Item ""[ext-id]" (Name browser plugin)": Response code 403 (Forbidden)
2 replies
PD🧩 Plasmo Developers
Created by luka on 1/3/2024 in #🔰newbie
Production and dev build
Hi all, I am having problems with some plasmo components I am using in my content script. For some reason whenever I start the server they dont show, until I console log something into the component. Any help would be appreaciated.
import type { PlasmoCSConfig, PlasmoGetInlineAnchor, PlasmoGetOverlayAnchor } from "plasmo"
import cssText from "data-text:~style.css"
import iconUrl from 'data-base64:~assets/icon.png';
import { useEffect, useState } from "react";
export const config: PlasmoCSConfig = {
matches: ["url-example*"],
}

export const getStyle = () => {
const style = document.createElement("style")
style.textContent = cssText
return style
}



export const getInlineAnchor: PlasmoGetInlineAnchor = async () => {
const buttonReference = document.querySelector('cib-serp')?.shadowRoot?.querySelector('cib-action-bar')?.shadowRoot?.querySelector('#camera-container');
return buttonReference;
};


const InputButton = () => {
const [loading, setLoading] = useState(false);

const handleButtonLoading = (e : any) => {
console.log('button event: ', e);
setLoading(prev => !prev);
}


useEffect(() => {
window.addEventListener("button-loading", handleButtonLoading);

return () => {
window.removeEventListener("button-loading", handleButtonLoading);
};
}, []);

return (
<div> Component here </div>

)
}

export default InputButton;
import type { PlasmoCSConfig, PlasmoGetInlineAnchor, PlasmoGetOverlayAnchor } from "plasmo"
import cssText from "data-text:~style.css"
import iconUrl from 'data-base64:~assets/icon.png';
import { useEffect, useState } from "react";
export const config: PlasmoCSConfig = {
matches: ["url-example*"],
}

export const getStyle = () => {
const style = document.createElement("style")
style.textContent = cssText
return style
}



export const getInlineAnchor: PlasmoGetInlineAnchor = async () => {
const buttonReference = document.querySelector('cib-serp')?.shadowRoot?.querySelector('cib-action-bar')?.shadowRoot?.querySelector('#camera-container');
return buttonReference;
};


const InputButton = () => {
const [loading, setLoading] = useState(false);

const handleButtonLoading = (e : any) => {
console.log('button event: ', e);
setLoading(prev => !prev);
}


useEffect(() => {
window.addEventListener("button-loading", handleButtonLoading);

return () => {
window.removeEventListener("button-loading", handleButtonLoading);
};
}, []);

return (
<div> Component here </div>

)
}

export default InputButton;
13 replies