Skip to content

Commit

Permalink
Maps, again.
Browse files Browse the repository at this point in the history
  • Loading branch information
oldestlivingboy committed Mar 15, 2012
1 parent 7be5577 commit 8ba93b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions webkit/gdc.safariextension/chrome/content.js
Expand Up @@ -99,11 +99,11 @@ function isMatching(url, domains) {
const DOMAIN_COUNT = domains.length;
for (var i = 0; i < DOMAIN_COUNT; i++)
if (url.toLowerCase().indexOf(domains[i], 2) >= 2) return true;
// A valid URL has at least two characters ("//"), then the domain.
// A valid URL has at least two characters ("//") then the domain.
}

/* Traps and selectively cancels a request. */
if (!isMatching(location.href, DOMAINS.concat(PRIMARY_DOMAIN)))
if (!isMatching(top.location.href, DOMAINS.concat(PRIMARY_DOMAIN)))
document.addEventListener('beforeload', function(event) {
if (isMatching(event.url, DOMAINS)) event.preventDefault();
}, true);
}, true); // TODO: Test every parent up to the top.
2 changes: 1 addition & 1 deletion webkit/gdc.safariextension/chrome/manifest.json
@@ -1,6 +1,6 @@
{
"name": "G Disconnect",
"version": "1.5.1",
"version": "1.5.2",
"description": "Stop Google from tracking the webpages you go to.",
"icons": {"48": "48.png", "128": "128.png"},
"permissions": [
Expand Down

0 comments on commit 8ba93b1

Please sign in to comment.