Skip to content

Commit

Permalink
Unblocked onsite Maps.
Browse files Browse the repository at this point in the history
  • Loading branch information
oldestlivingboy committed Mar 15, 2012
1 parent 8ba93b1 commit fa34dd3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
Binary file modified builds/gdc.xpi
Binary file not shown.
32 changes: 19 additions & 13 deletions firefox/components/policy.js
Expand Up @@ -147,20 +147,26 @@ GoogleDisconnect.prototype = {
var domains = this.domains;
var result = accept;

if (
contentType != contentPolicy.TYPE_DOCUMENT && // The MIME type.
requestOrigin && requestOrigin.asciiHost &&
!isMatching(requestOrigin.host, domains) && // The whitelist.
contentLocation.asciiHost &&
isMatching(contentLocation.host, domains)
// The blacklist.
) {
if (context) {
var html = context.ownerDocument;
var googleRequestCount = html.googleRequestCount;
html.googleRequestCount =
typeof googleRequestCount == 'undefined' ? 1 : ++googleRequestCount;
if (!JSON.parse(html.defaultView.content.localStorage.googleUnblocked))
result = contentPolicy.REJECT_SERVER; // The blocking state.
var content = html.defaultView.content;

if (
contentType != contentPolicy.TYPE_DOCUMENT && // The MIME type.
requestOrigin && requestOrigin.asciiHost &&
!isMatching(requestOrigin.host, domains) &&
!isMatching(content.top.location.hostname, domains) &&
// The whitelist.
contentLocation.asciiHost &&
isMatching(contentLocation.host, domains)
// The blacklist.
) {
var googleRequestCount = html.googleRequestCount;
html.googleRequestCount =
typeof googleRequestCount == 'undefined' ? 1 : ++googleRequestCount;
if (!JSON.parse(content.localStorage.googleUnblocked))
result = contentPolicy.REJECT_SERVER; // The blocking state.
}
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion firefox/install.rdf
Expand Up @@ -28,7 +28,7 @@
<em:type>2</em:type><!-- An extension. -->
<em:id>google@disconnect.me</em:id>
<em:name>Google Disconnect</em:name>
<em:version>2.3.0</em:version>
<em:version>2.3.1</em:version>
<em:creator>Disconnect</em:creator>
<em:developer>Brian Kennish</em:developer>
<em:developer>Gary Teh</em:developer>
Expand Down

0 comments on commit fa34dd3

Please sign in to comment.