Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into new-tab
Browse files Browse the repository at this point in the history
Conflicts:
	app/manifest.json
  • Loading branch information
Avi Kohn committed May 13, 2015
2 parents 8057416 + 43bda21 commit 71c07b7
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 345 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -3,6 +3,8 @@ language: node_js
node_js:
- "0.12"

sudo: false

before_install:
- npm install -g grunt-cli
- "echo -n {} >> keys.json"
Expand Down
23 changes: 19 additions & 4 deletions app/js/widgets/framefix.js
@@ -1,12 +1,22 @@
/**
* This creates an onHeadersReceived listener on an as-needed basis.
*/
define(function() {
var listening = false;
define(["jquery"], function($) {
var listening = false,
attaching = false,
callbacks = [];

var check = function(cb, ctx, args) {
if (listening) return true;


callbacks.push(function() {
cb.apply(ctx, args);
});

if (attaching) return false;

attaching = true;

chrome.tabs.getCurrent(function(tab) {
chrome.webRequest.onHeadersReceived.addListener(
function(info) {
Expand All @@ -33,8 +43,13 @@ define(function() {
);

listening = true;
attaching = false;

cb.apply(ctx, args);
callbacks.forEach(function(cb) {
cb();
});

callbacks = [];
});

return false;
Expand Down
2 changes: 1 addition & 1 deletion app/manifest.json
Expand Up @@ -59,7 +59,7 @@
"bookmarks",
"management"
],
"version": "2.1.16",
"version": "2.1.17",
"manifest_version": 2,
"default_locale": "en",
"short_name": "iChrome",
Expand Down

0 comments on commit 71c07b7

Please sign in to comment.