Permalink
Browse files

Unblocked onsite Maps.

  • Loading branch information...
1 parent 8ba93b1 commit fa34dd328aec7daafaec8f81d5d2f3b6ba3edfeb @oldestlivingboy oldestlivingboy committed Mar 15, 2012
Showing with 20 additions and 14 deletions.
  1. BIN builds/gdc.xpi
  2. +19 −13 firefox/components/policy.js
  3. +1 −1 firefox/install.rdf
View
Binary file not shown.
@@ -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;
View
@@ -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>

0 comments on commit fa34dd3

Please sign in to comment.