Relative Content

Tag Archive for javascriptgoogle-chrome-extensionchrome-extension-manifest-v3

Injected contentScript via background.js is not respecting match pattern

Expected behaviour For injected content script to run on specific pages that I set within my manifest.json Current behaviour Contentscript is injected on every page. Or atleast I seem to see errors in console for background indicating background.js:1 Uncaught (in promise) Error: Cannot access contents of url… “. Maybe it’s working but I don’t want […]

Chrome extention – Calling a content function from a non content js file

I am trying to build a chrome extension and I am having a hard time trying to call a function that is inside “content.js” from another regular js file.
the purpose function inside content.js is to fill all the input tags inside the DOM of the tab I am currently on to a given value that I choose inside my extension page.