𝕯èส𝓿ḯส𝕝
𝕯èส𝓿ḯส𝕝
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
in your build/<browser> directory, what path is the file showing in
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
you can't use a compiled url. the image must be a file path string not a url
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
I am only setting this from the background script
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
my images didn't need to be put in the manifest because they are not being "downloaded" by a webpage. they are only overriding the icon declaration in the manifest
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
i include a tabId because I am only changing the icon for that tab
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
my crx is a universal definition of const crx = browser?.action ? browser : chrome;
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
this is what mine looks like:
crx.action.setIcon({
tabId,
path: {
'16': 'assets/[email protected]',
'32': 'assets/[email protected]',
'48': 'assets/[email protected]',
'64': 'assets/[email protected]',
'128': 'assets/[email protected]'
}
);
crx.action.setIcon({
tabId,
path: {
'16': 'assets/[email protected]',
'32': 'assets/[email protected]',
'48': 'assets/[email protected]',
'64': 'assets/[email protected]',
'128': 'assets/[email protected]'
}
);
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
it would be just the directory in the extension and the file. the same way it would look in the manifest
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
chrome.action.setIcon({
path: 'assets/greyScaledIcon.png'
});
chrome.action.setIcon({
path: 'assets/greyScaledIcon.png'
});
24 replies
PD🧩 Plasmo Developers
Created by Isra on 2/5/2024 in #👾extension
Dynamically change icon
from the background script:
(browser?.action ?? chrome?.action)?.setIcon({
path: {
16: 'myIcon_16x16.png',
32: 'myIcon_32x32.png'
}
})
(browser?.action ?? chrome?.action)?.setIcon({
path: {
16: 'myIcon_16x16.png',
32: 'myIcon_32x32.png'
}
})
or if only one size icon
(browser?.action ?? chrome?.action)?.setIcon({
path: 'myIcon_32x32.png'
})
(browser?.action ?? chrome?.action)?.setIcon({
path: 'myIcon_32x32.png'
})
24 replies
PD🧩 Plasmo Developers
Created by Saitama on 1/9/2024 in #🔰newbie
I am unable to open popup.
no, mine appears to be directly related to mono repos. i have on fix ready to PR, but i’m still missing something and hunting it down. i no longer believe my issue is related to this topic here
13 replies
PD🧩 Plasmo Developers
Created by Saitama on 1/9/2024 in #🔰newbie
I am unable to open popup.
i'll hang in co-working screen sharing while i try to find the issue, in case anyone want to see
13 replies
PD🧩 Plasmo Developers
Created by Saitama on 1/9/2024 in #🔰newbie
I am unable to open popup.
I am having a similar issue. I created the project with npm create plasmo -- --entry=options,newtab,contents/inline --with-src copiles fine, dev runs fine, console.logs work everywhere(background, options, newtab, content), inspecting shows source code correctly and the umd code with react in it... react is never mounted though. searching the code i can't find anything that is even attempting to query the document for the mounting locations. so things like popup do open, but with there being no content, it is a very tiny square. my project is within an npm workspaces mono repo which shouldn't matter.
13 replies