Category "google-chrome-extension"

Chrome Extension manipulate DOM ONLY if tab is in focus

I have a Chrome Extension that subscribes to a WebSocket and pops a window when a message comes down that socket. This runs in a background script, so no matte

ManifestV3 new promise error: The message port closed before a response was received

I'm working on an extension that does a lot of message-passing between its content scripts and the background service worker (manifest V3), and I've noticed an

chrome.runtime.sendmessage not working in chrome extentions

hello I have a question I send to backgroud.js from content.js; but it is append error : Could not establish connection. Receiving end does not exist. but it w

How do I send fetched data from chrome extension background script to content script?

Once an event is triggered in my content script, it send a message request to the background script and waits for a response. content.js chrome.runtime.sendMess

Chrome API chrome.desktopCapture.chooseDesktopMedia - How to get the id of selected tab?

I am using desktopCapture.chooseDesktopMedia with only ["tab"] option to choose the tab to be streamed. After making the selection, chrome doesn't automatically

Chrome extension to replace text on webpage works only after manually refreshing webpage sometimes

I am developing a chrome extension to replace specific texts on webpage. For some websites, it works only after refreshing webpages manually with F5. For exampl

Communication between multiple users of one extension

I am planning on building an chrome extension that would allow 2+ users communication on different devices. Basically one user would fill out the textarea and s

File reference in Chrome extension

I would like to load a model in contentScript.js using url './model/model.json' const MODEL_URL = './model/model.json'; const model = tf.loadLayersModel(MODEL_U

Mutation observer not being called when there's a change in Shadow Dom tree

i have a running extension where i use combination of mutation observer and tree walker to filter out text nodes and embed React component on that page where i

how to get [chrome.instanceID.getID] , [chrome.storage.sync.get] by async & await?

How do you get the information for the Chrome extension by using async and await? [chrome.instanceID.getID] [chrome.storage.sync.get] We tried this code: async

How can I replace my webRequest blocking with declarativeNetRequest?

I'm try to migrate my chrome extension to Manifest V3, and having some troubles with webRequest. I don't know how to replace the below source code to declarativ

Chrome manifest v3: runtime.lastError specify 'func' and 'files'?

I'm searching for a solution everywhere and I can't find nothing about this error. I'm trying to "update" a Chrome extension to manifest v3 and I get this error

chrome.tabCapture is undefined when extension icon is clicked

I am trying to use the chrome extension tabCapture API. To do this, I hooked up a simple background script that adds a click handler to the extension icon (via

Users can decompile Source Code, how can I safely access Databases and Servers?

So, Im programming a Chrome Extension. I want to store data in a Database. I logically dont want anyone else to have access to the database. How can I make it t

Hiding DOM elements with a chrome extension without causing a flicker

Preface: I am aware that there is a duplicate question out there. I am posting it again because it has no answers (and it's from 4 years ago). General descripti

Connect to MetaMask via chrome extension

I am making a chrome extension that requires MetaMask authentication. I started developing it as a web application, but as a chrome extension, it doesn't detect

MV3 Serviceworker won't wake up when sent a message from the contentscript

Is it an expected behaviour for a serviceworker to not respond to or wake up when a message has been sent from a content script or popup. And if so , how do I w

Intermittent CORS issue with FastAPI deployed on Heroku

I deployed a FastAPI based backend on Heroku and whenever I query the url via cURL or Postman, it works fine. However, when it queried from a chrome extension (

Can i modify theme colors real time with chrome extension

I'm curious if i can modify the theme colors based on a button click in a chrome extension. I couldn't find an answer reading the Chrome extension docs. Thx!

Can't disable controls in a youtube video

I am running a content.js on a youtube page and i want it to disable the controls of the youtube video. I am getting the video by video=document.querySelector('