google-chrome

Using jQuery.getJSON in Chrome Extension

I need to do a cross-domain request in a chrome extension. I know I can it via message passing but I'd rather stick to just jQuery idioms (so my javascript can also work as a <script src="">). I do the normal: $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&amp;tagmode=any&amp;format=json&amp;jsoncallback=?",...

How can I deal with this encoding?

Hi all, I'm now trying to parse chrome bookmarks, but I encounter a problem. the bookmarks snippet is presented as follow: { "date_added": "12915566290018721", "id": "16", "name": "hao123\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875", "type": "url", "url": "http://www.hao123.com/" } ...

Chrome Extension: how to capture selected text and send to a web service

For the Google Chrome extension, I need to capture selected text in a web page and send to a web service. I'm stuck! First I tried a bookmarklet, but Chrome on Mac seems to have some bookmarklet bugs so I decided to write an extension. I use this code in my ext: function getSelText(){ var txt = 'nothing'; if (window.getSe...

How do I go about embedding a youtube chromeless player without adding controls?

I am creating an online experiment. It involves participants watching a video then answering a questionnaire. I would like to embed a chromeless youtube video which plays automatically on page load, does not have controls for participants to play around with, and loads the next page once the video finishes. Now the autoplay/forward to ...

Javascript window.open firefox/chrome issue

Hi, I've application to open popup window to print page. function printHTML(urlPath) { var printPopUp = window.open(urlPath,null,"height=600,width=777,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes"); printPopUp.print(); } This script is working fine in IE, but in firefox/chrome. print() function is overlapping window.o...

php mp3 headers in google chrome

I have this in a php to show a mp3 file, it code works fine on firefox and explorer but in chrome it not work. The chrome player appears but no sound and not increases time $ext = strtolower(substr(strrchr($filename,"."), 1)); $ctype = "audio/mpeg"; header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate( 'D...

How to prevent google chrome from caching my inputs, esp hidden ones when user click back?

hi there, i have an asp.net mvc app which have quite a few hidden inputs to keep values around and formatting their names so that i can use the Model binding later when i submit the form. i stumble into a weird bug with chrome which i don't have with IE or Firefox when the user submits the form and click on the back button, i find that ...

Google Gears - Database - VACUUM

With this code: var db = google.gears.factory.create('beta.database'); db.open('cominar'); db.execute('CREATE TABLE IF NOT EXISTS Ajax (AJAX_ID INTEGER PRIMARY KEY AUTOINCREMENT , MODULE TEXT, FUNCTION TEXT, CONTENT_JSON TEXT);'); db.execute('VACUUM;'); // nettoye la DB I'm trying to clean the database (VACUUM) at each initialisation ...

Can I tweak a page's appearance using Google Chrome's developer tools?

When I'm working on a web page layout, I often use Firefox and Firebug to tweak the CSS until it looks right, then modify my style sheet to match. Right now, I'm trying to fix something that looks fine in other browsers but wrong in Google Chrome. I have pulled up Chrome's Developer Tools, and can inspect the computed style, but don't s...

Conditional statements bug in Google Chrome

When I use a conditional statement targeting IE6 and below with some PHP code Google Chrome disregards the statement and inserts the code. Example: <!--[if lte IE 6]> <?php require_once("ie6.php"); ?> <![endif]--> It will insert the content of ie6.php in the body anyway. The code in ie6.php is something like this: <?php print '<p>T...

Chrome Beeps on removeAllRanges();

Is chrome beeping during a "removeAllRanges();" to indicate an error in the code, or just that an action has been taken? My script does not seem to fail... ...

How can I equalize the heights of text input fields?

What is the best way to equalize the height of my <select..> elements and my <input type="text"..> elements? It's proving difficult because of differences in box-sizing models. Google Chrome's user agent stylesheet has this: select { -webkit-box-sizing: border-box; } ..whereas other text input fields use the content box model. Why th...

Simulate Offline Mode for HTML5 Cache Testing

I have an HTML5 application that requires offline support. I am using a local Apache server for the application, and am trying to figure out what the best way is to simulate offline mode (currently, in Firefox I disable my Air-Port to simulate offline mode, but this is a pain). Any suggestions? I am open to using other browsers if a meth...

GoogleChrome bug on display handcursor - AS3

Any solution how to "force" Google Chrome in Mac to display hand cursor over movieclips when useHandCursor = true is used? ...

A simple hello world NPAPI plugin for Google Chrome?

I am trying to make a chrome plugin but Chrome API doesn't give me enough power. I want to use NPAPI but I have no idea how to use it but I do have experience in Visual C++. Can someone show me a 'Hello world' in C++ application so I can get started? ...

Start an external application from a Google Chrome Extension?

How to start an external application from a Google Chrome Extension? So basically I have an executable file which does the job when you launch it. I need to be able to start it without a window (it is a console application) and pass the current URL to it in an argument, ...

Why doesn't javascript function aliasing work?

I have some Firebug console function calls that I wanted to disable when Firebug wasn't enabled, e.g. console isn't defined. This works fine in IE6 and FF3, but not in Chrome: var log; if(console){ log = console.log; }else{ log = function(){ return; } } I get an "Uncaught TypeError: Illegal Invocation" in Chrome =/ I read about ...

jQuery code working in Safari and Chrome but not Firefox

I'm got a site that has a long list of tweets, and as you scroll down the right column follows you down, showing stats on the tweets. (See it in action at http://www.grapevinegame.com . Click 'memorise', then 'skip' to get to the list page. Works in Safari and Chrome). I'm using jQuery to update the top-margin of the right column, incre...

JQuery Ajax returns status 0 in Google Chrome, works fine with other browsers.

Hello, I am using jQuery ajax, and it worked very well until I tried the site in Google Chrome. I am directed to the success handler. However, when I printed the status of the XMLHttpRequest, I got a 0. The responseText is empty as well. This only happens in Google Chrome. I tried the same code on Safari, Firefox, and Opera, they are wor...

Are google chrome extension "content" scripts sandboxed?

I was under the impression that the content_scripts were executed right on the page, but it now seems as though there's some sandboxing going on. I'm working on an extension to log all XHR traffic of a site (for debugging and other development purposes), and in the console, the following sniff code works: var o = window.XMLHttpRequest...