google-chrome

Detecting lost window focus in Google Chrome

I need to know via javascript whether a page has focus or not. When the user switches to another tab, minimizes the browser, or clicks outside the browser, the page shouldn't have focus. When the user returns to the window, by opening it, returning to the tab, clicking on the page, the page needs to have focus. The problem is the meth...

How to modify current url location in chrome via extensions

I want to create an extension that redirects the user to another website if he clicks on the extension button. So far I have only seen extensions which create a new tab for each click. Is it possible to redirect the user to another website using the active tab? I tried something like this: chrome.browserAction.onClicked.addListener(fu...

Chromium extensions: How to run a content_script after all the document's listeners are triggered?

How can one run a chromium extension content_script after window.load and after all other window.load listeners have been triggered? I'm currently hacking thru a site's javascript attempting to improve it's functionality. But I want such improvements to happen after all it's ready js is finished. What I actually need is a way to set a ...

Javascript floating launch bar

I'm trying to make a just a simple launch bar with a search button that appears in a page when a hotkey is pressed. I'd prefer not having to use a bunch of libraries like mootools or FancyBox(although I'm sure it would make it easier) since this is for a Chrome Extension and I'd like to keep it as small as possible. Any suggestions or s...

Google Chrome Extensions, Doesn't Respond to Bookmark Events

I am trying to utilize the Google Bookmarks API for Chrome Extensions (this is not the Google Bookmarks API as in http://www.google.com/bookmarks/, but rather Chrome Bookmarks API). Anyway, I just tried a simple example which I have the background.html and the manifest.json listed below. However, I am not getting the alert dialog box. ...

Has Chrome improperly implemented the dataTransfer object?

When I do this in dragstart event: e.dataTransfer.setData('text/plain', 'text'); e.dataTransfer.setData('text/html', 'html'); e.dataTransfer.setData('application/x-bookmark', 'bookmark'); and this in drop event: for (var i = 0; i < e.dataTransfer.types.length; i++) { var type = e.dataTransfer.types[i]; console.log(type + ":" + ...

Firing a keyboard event on Chrome

I'm trying to fire a keyboard event to a page using javascript on Chrome. I had an approach that used to work on Firefox: pressKey = function(key, shift) { var evt = document.createEvent('KeyboardEvent'); evt.initKeyEvent("keypress", false, true, null, false, false, shift, false, keyCode(key), key.charCodeAt(0)); ...

Chrome extension using ibox popup

I am trying to make a popup appear using the iBox javascript. When I tested on my machine using a simple html (called "test.html"), it worked fine. However, when I used the same call in my Chrome extension document.addEventListener('keydown', function(e){ if (e.keyCode == 81 && e.altKey && !e.shiftKey && e.ctrlKey) { iBox.showURL('se...

Chrome and fixed width on a div (or other tags).

I have some html which looks like this: <div style="{ display:inline; width: 80px}">fig</div>vitamin c<br> <div style="{ display:inline; width: 80px}">apple</div>vitamin a<br> <div style="{ display:inline; width: 80px}">coconut</div>vitamin <br> in IE.8 this is shown as fig vitamin apple vitamin coconut vitamin and al...

Personal Internet Moderation Script

What approach should I take to develop software to block traffic at the desktop level (windows) to sites based on their domain name. Messing with a host file was easy, but the browser seems to have too long of a delay before it recognizes changes in the host file. My ideal solution would be a simple ruby script to disable sites during ...

JavaScript: Sluggishness events? Google Chrome "Speed Tracer" extension is reporting

Using Google Chromes new Speed Tracer extension to profile my app. Appears my app is constantly reporting "Sluggish (events) 100%", which means the browser is blocking html rendering. I don't understand enough how to interpreter the Speed Tracer tool to fix this issue. Any help appreciated. My web app is: bit.ly/7J0U ...

Change Windows browser proxy settings via ruby script

I'm looking for some code/library to programmatically change proxy settings for popular browsers using Ruby on Windows. Thanks. ...

Any example of writing an NPAPI plugin in Linux?

Hi, all I need to write a browser plugin to communicate with another process, and it seems I have to use NPAPI plugins. Is there any example or open source NPAPI plugin I can refer to? Many thanks for your reply. Summary of answers http://mxr.mozilla.org/seamonkey/source/modules/plugin/samples/ http://firebreath.googlecode.com/ http...

tiny mce not working properly in google chrome

I have four textareas in my form. TinyMce editor applies to only first textarea, remaining for textareas dont get editor in google chrome. It works fine in firefox instead. Please help!! ...

problem with google chrome and fileinput

We have a web site where a user can upload their resume. If they upload it in any browser it works fine. If they do NOT upload a document it works fine in all browsers but google chrome. We have a server side vb dll that captures the form contents and any files uploaded are stored in a dictionary object which the processing page then ...

Webkit browsers pushing a bullet to the right.

The website that I'm currently working on is having a few issues with Webkit browsers (Chrome, Safari, etc.) One of those issues is that I have a bullet list that is displaying strange. The top bullet item is going to the right of the list rather than the left. I can't seem to fix it. I've tried overflow:hidden, I've tried list-style...

CSS menu issue in Safari and Chrome. Submenu disappears on hover unless you're really fast!

When you hover over the top level links, the submenu appears as it should, but when you move the cursor down over the sub menu, it disappears sometime immediately and sometimes after the 3rd or 4th submenu link depending on how precise or fast you are! It works fine in firefox, ie7 and ie8 and validates for css and xhtml transitional. Pl...

Chrome User Script Checking for new Tweets

Hey guys, so I have a tab for twitter.com open all the time in Chrome and I've written a userscript that checks the document title every so often for new tweets. Since the Twitter web interface automatically checks, it will show (2) Twitter / Home as the title if there are two new tweets. Everything works as I want it to, and right now I...

jQuery slide div from bottom going wrong in Google Chrome

I have written my own image slider in jQuery that slides up a caption div from the bottom of the image. Please see the demo on the following link: http://beta.marhaba.co.nz/about When viewing this page in Google Chrome, you will notice how the caption div does not appear from the bottom of the image, but from below the image. To best u...

How do I add Roboform Bookmarklet to the Chrome browser toolbar

I'm slowly moving over to use Google Chrome almost exclusively. The one thing that is really stopping me is Roboform - which I use and love. There is a RoboForm bookmarklet which does most of what I need, and this works a treat. What I want to do though is have a RoboForm icon on the Chrome toolbar (next to the address bar), which invok...