Skip to content
Advertisement

Tag: google-chrome-extension

chrome.runtime is undefined when extension installed from chrome store

When i console.log(chrome) with google chrome browser i get certain properties but i find the ‘runtime’ property of chrome is not available. so chrome.runtime is undefined. and hence i am not able to use chrome.runtime.sendMessage for my extension How to resolve the above?? EDIT : my code is : EDIT 2 : from here : https://developer.chrome.com/docs/extensions/mv3/manifest/externally_connectable. I am sure(correct me

Inject CSS stylesheet as string using Javascript

I’m developing a Chrome extension, and I’d like users to be able to add their own CSS styles to change the appearance of the extension’s pages (not web pages). I’ve looked into using document.stylesheets, but it seems like it wants the rules to be split up, and won’t let you inject a complete stylesheet. Is there a solution that would

Get selection from Google Docs

Is there a way around the fact that does not seem to work in Google Docs? I want to capture text from a highlighted selection from Google Docs. My implementation is with Chrome Extensions, but that is not as relevant as the fact that window.getSelection() doesn’t seem to work there (though it does elsewhere). Thanks! Answer As mentioned on Docs

Access variables and functions defined in page context using a content script

I’m learning how to create Chrome extensions. I just started developing one to catch YouTube events. I want to use it with YouTube flash player (later I will try to make it compatible with HTML5). manifest.json: myScript.js: The problem is that the console gives me the “Started!”, but there is no “State Changed!” when I play/pause YouTube videos. When this

Advertisement