google-chrome-extension

how to popup my google chrome extension

google chrome extension: i have added a context menu to the browser, how to I popup the popup.html on click on the context menu item ? ...

Chrome new tab event

I want to fire an event when a new tab is created in Chrome. I thought the following would do it, but it seems not. (beginner) manifest.json { "name": "My First Extension", "version": "1.0", "description": "The first extension that I made.", "background_page": "background.html", "permissions": [ "tabs" ] } background...

Can one Chrome extension enable or disable another one?

I have a chrome extension that very simply injects CSS before a page loads. (I know this could be done by javascript once the page has loaded, but this causes the page to flash as it changes/renders the new CSS.) The CSS is injected as a content script using code like: "css": ["mystyles.css"], "run_at": "document_start", I would ...

How do I have a link from a Google Chrome extension popup open in the same tab underneath?

I want the link to appear in the tab beneath resulting in the popup going away. Currently have this: //Open links in tab from popup if (document.location.search == '?popup') $('a').attr('target', '_blank'); But the _blanks opens in a new tab. Any help would be greatly appreciated - thanks! ...

Does Google Chrome have APIs to access it's downloads page?

Am I able to "tap into" Google Chrome's Downloads page through an extension/add-on? I want to write an extension that needs the file names (or paths) of all the files that are currently being downloaded by the user. Will this possible? What APIs should I be looking at? It is quite tricky to search for this and I don't know where to begin...

How do I debug a Chromium extension?

I'm trying to debug a Chromium extension with console.log(), but I noticed that nothing is appearing in my JavaScript console. I assume the console object for the extension is not the same console that the document has access to, so how do I dumb a variable into JSON so I can see the result. I'm looking to get something like console.log(...

Chrome, Javascript, JSON and __proto__ -- where are my methods?

I've got a function: function createOrLoadDB (host) { var db = JSON.parse( window.localStorage.getItem(host) ) if ( db == null ) { db = new InitDB(host) } else { ...

Chrome Extensions: simple message passing vs chrome connection

At what point should I use a chrome connection? Is there ever a good reason to use both simple message passing and long lived connections? Do these two have separate performance implications? Are there any docs other than http://code.google.com/chrome/extensions/messaging.html that compare the two approaches? ...

Legal implications of redistributing web-content?

If you have a site that uses Javascript with no mention of a license in the Javascript, is it legal to take that Javascript, package it, and redistribute it? I'm looking to write a Google Chrome extension for Stackoverflow -- I've recently requested permissions on master.js to eliminate this ambiguity; but, now I'm curious if I had to d...

javascript objects cant see each other? :: google chrome extension

i have two files one called stats.js one called storage.html in stats.js in contains var stats = { myFunc : function() { //do something } } in storage.html I have <html> <head> <script src="stats.js"></script> <script> $(document).ready(function() { stats.myFunc(); }); </script> </head> </html> But I get Uncaugh...

Write once run anywhere browser plugin tool/framework/language?

I'm looking to create a browser plugin which would run in all of the major browsers, the only problem is that it seems I have to re-create the plugin in every browser. Is there some tool or framework or language I can write a plugin with where it will automatically work on all major browsers? All I need the button to do is scrape webpa...

Chrome extension's CSS is not loaded

I'm developing a "content script" Chrome extension. I'm trying to use a CSS files to style some existing elements on a page and to style elements that I create dynamically with JavaScript. I've specified my CSS file in the manifest.json file: { ... "content_scripts": [ { "matches": [ ... ], "js":...

google chrome extension :: console.log() from background page?

If I call console.log('something'); from the popup page, or any script included off that it works fine. However as the background page is not directly run off the popup page it is not included in the console. Is there a way that I can get console.log()'s in the background page to show up in the console for the popup page? is there any...

How do I detect if the browser window is active

The code im currently using is this var focus; function focuswindow() { focus = true; } function hidewindow() { focus = false; } window.onfocus = focuswindow(); window.onblur = hidewindow(); The idea is that it can be used like this if( focus ) { //do something } However its not working. Also it only needs to work on Chrome (so no ...

Alerting website visitors that a chrome extension is available - how?

The Independent website has a little widget that pops up a message informing you that there is an Independent Chrome extension available when you visit it using Chrome (v7 in my case): Is this part of the Chrome extensions API - if so how is it achieved (or have they custom-rolled their own JavaScript to make it look like part of Chr...

show page action popup on click

I'm making a chrome extension that uses pageAction. I can set when it shows whether I want it to have a popup or handle the click myself. What I want to do is handle the click myself, but with certain scenarios I don't want to process the normal code, and want to show the user a message. Preferably with a popup. But it seams I can ei...

“Vertical grid” google-chrome plugin for HTML-coder.

Is there a plugin for google-chrome browser to show vertical grid (something like that): This grid is displayed in layer over the site. Settings of it - transparency, the number and width of the lines (including the use of percentages). In short, it is a tool for HTML-coder. ...

chrome extension to pass current tab url to remote json search then parse results into an html table.

I am trying to make a chrome extension that allows to me to take the url of the current tab and pass that to a 3rd party website search. This php returns JSON formatted text. I would then like to format this JSON as a simple html table. pseudo code: function getUrl(){ currentUrl = the current tab url } function search(currentUrl...

The action icon is not showing in window for any extension.

Hi, I had built an extension for a game. It worked so that when I went to gameroom, and clicked a game, the site gives new window as a popup. The extension then appeared in the right upper corner of the url. Then I could click and get a tab window in Chrome. After updating, I don't see the icon (action) anymore. This is not only for my ...

How to implement a window, or div, that can stay on top of any Chrome browser page, when invoked?

I want to implement an extension in Chrome that I'd display some text related to the current page being viewed. I have learned ways to code div to be part of an HTML page that is specifically designed to support such always on top popup (div), but I have no clue how to make a window/div or whatever text area to stay on top of any web p...