Chrome extension, how to Modify page content (add something) [duplicate]
You can find some example at Google Sample Extension page, however your question seems better answered on this other question.
You can find some example at Google Sample Extension page, however your question seems better answered on this other question.
Update This answer was originally written in 2015. The compatibility table link shows Chrome, FF, Edge, and Safari are more compatible than Babel now. Chrome 49+, FF 45+ may not benefit from Babel. Other browsers, may need transpiling. Original I am also currently developing a Chrome Extension in ES6. Your questions seems to be more … Read more
A little “background story”: You want to let the user choose and upload a file from your popup. But in OSX, as soon as the file-chooser dialog opens, the popup loses focus and closes, causing its JS context to get destroyed as well. Thus, the dialog opens and closes immediately. This is a known bug … Read more
chrome:// urls are blocked for security reasons. Google doesn’t want you to change the appearace or change chrome settings without the user knowing it. when you load your extension, it immediately executes those files inside the chrome://extensions page. If you want to execute your script in every tab the user goes to, you should use: … Read more
In the (hopefully near) future, you’ll be You are now able to store stuff in chrome.storage.sync, and it will be synced automagically. Unless you need something right now, do consider putting all your configurations in an single object, sometime later you’ll be able to just sync it! Edit: now this is available in stable Chrome!
URL of a file inside an extenion folder has the following format: chrome-extension://<ID>/topbar.html You can get this path by running: chrome.extension.getURL(“topbar.html”) Now if you try to do: $(‘#topbar’).load(chrome.extension.getURL(“topbar.html”)); it wouldn’t let you because of cross-origin policy. Background pages don’t have this limitation, so you would need to load HTML there and pass result to a … Read more
It only collapses consecutive rows that are identical, I don’t see it as much of a problem, but with the settings button in the top right corner of the console you can enable ‘Show timestamps’ which will put them on different lines: You can see they only collapse consecutive duplicates with this: msgs = [‘hello’, … Read more
Sure you can, using the brand new APIs. window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; window.requestFileSystem(window.TEMPORARY, 1024*1024, function(fs) { fs.root.getFile(‘test.bin’, {create: true}, function(fileEntry) { // test.bin is filename fileEntry.createWriter(function(fileWriter) { var arr = new Uint8Array(3); // data length arr[0] = 97; // byte data; these are codes for ‘abc’ arr[1] = 98; arr[2] = 99; var blob … Read more
NPAPI was deprecated from Chrome/Opera for security concerns. You can still use NPAPI if you are targeting firefox, but if Firefox follows the trend it might disable it at some point as well. The better options you have today are Use NaCl if you are targeting only Chrome You can use instead NativeClient (A.K.A. NaCL, … Read more
Chrome extensions are stored in your filesystem, under the Extensions folder, inside Chrome’s user data directory. Windows XP: C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions\<Extension ID> Windows 10/8/7/Vista: C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default\Extensions\<Extension ID> macOS: ~/Library/Application Support/Google/Chrome/Default/Extensions/<Extension ID> Linux: ~/.config/google-chrome/Default/Extensions/<Extension ID> Chrome OS: /home/chronos/Extensions/<Extension ID> You can copy the extension folder and drop it on a USB or in … Read more