Alex's Breadboard Chrome Extension Friction Log #1451
alexandraM98
started this conversation in
Friction Log
Replies: 2 comments 1 reply
-
Here is a detailed list of updates and work in progress related to the previously described chrome extension that uses Breadboard:
![]()
Screen.Recording.2024-05-24.at.16.04.11.movTo add some visual feedback for users, badges were added to indicate the status of the board (
Screen.Recording.2024-05-24.at.16.06.24.mov |
Beta Was this translation helpful? Give feedback.
1 reply
-
@paullewis, since you've been poking at Chrome extensions |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Building a Chrome extension using Vite and React:
npm create vite@latest breadboard-chrome-extension -- --template react-ts
command and created a basic UI and initial board following a previous example I've written at: https://github.com/ExaDev/create-breadboard/tree/main/templates/vite-react-ts/src<textarea>
tag). Then, the next step was to get the text content of the active tab instead. For this, the following solutions were considered:chrome.scripting.executeScript
saveAsHTML
function, but wasn't sure what parameters were actually needed.The current solution uses the
chrome.scripting
API:Using the above function I execute a script that returns the innerText of the document's body for the active tab (
target
is set to the active tab's ID for this reason).The following threads were helpful in reaching the current solution: https://stackoverflow.com/questions/70736493/chrome-extension-obtaining-active-tabs-dom-information-through-background-scr; https://stackoverflow.com/questions/8499376/chrome-extension-get-entire-text-content-of-the-current-tab
Beta Was this translation helpful? Give feedback.
All reactions