<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Surrogate Scripts vs Google Analytics</title>
	<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/</link>
	<description>Giorgio Maone's answers to the Web, the Universe, and Everything</description>
	<pubDate>Sat, 31 Jul 2010 04:44:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: hackademix.net » Google Analytics Opt-Out Snake Oil</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-23034</link>
		<dc:creator>hackademix.net » Google Analytics Opt-Out Snake Oil</dc:creator>
		<pubDate>Wed, 26 May 2010 21:09:30 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-23034</guid>
		<description>[...] in fact, almost one year and half ago, this very issue prompted the development of NoScript’s Script Surrogates feature, which prevents the breakage by “emulating” the blocked script with dummy [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] in fact, almost one year and half ago, this very issue prompted the development of NoScript’s Script Surrogates feature, which prevents the breakage by “emulating” the blocked script with dummy [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-19603</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Mon, 18 Jan 2010 22:33:51 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-19603</guid>
		<description>Sorry for my slow response, but that seems to work perfectly.  Thanks for the help and the fast reply!</description>
		<content:encoded><![CDATA[<p>Sorry for my slow response, but that seems to work perfectly.  Thanks for the help and the fast reply!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giorgio</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-19412</link>
		<dc:creator>Giorgio</dc:creator>
		<pubDate>Fri, 15 Jan 2010 17:38:08 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-19412</guid>
		<description>@&lt;a href="http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-19392" rel="nofollow"&gt;Nick&lt;/a&gt;:
This one works for me:
&lt;pre&gt;
document.write = function(s){ if (!/&#60;meta/i.test(s)) document.__proto__.write.apply(this, arguments) };
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@<a href="http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-19392" rel="nofollow">Nick</a>:<br />
This one works for me:</p>
<pre>
document.write = function(s){ if (!/&lt;meta/i.test(s)) document.__proto__.write.apply(this, arguments) };
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-19392</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Fri, 15 Jan 2010 03:02:18 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-19392</guid>
		<description>Good grief, third try is the charm I hope:

I have a specific issue I think NoScript surrogates can help with but I'm having a hard time getting it to work.  If you have any ideas I'd love to hear them.

There is a page which does a check to see if it has been opened in a new window.  It does this in a page-level &#60;script&#62; element located in the &#60;head&#62; of the page. Inside this script element it does a check and then runs

document.write('&#60;META HTTP-EQUIV=&#34;refresh&#34; CONTENT=&#34;0; URL=notallowed.html&#34;&#62;');

I've gotten the page-level surrogate script to run, but haven't been able to figure out a good way to cancel this out.  I've tried removing the element, but when the surrogate runs the script element doesn't seem to even exist in DOM yet.  I've tried overriding the document.write function so it doesn't do anything, but that doesn't seem to carry over into the page scripts.

Since the browser begins the redirect as soon as the &#60;script&#62; element is parsed, so the only way I can think to accomplish this is with NoScript's surrogates (since they happen early enough) but I'm wondering if maybe they happen *too* early?

Any tips would be great!</description>
		<content:encoded><![CDATA[<p>Good grief, third try is the charm I hope:</p>
<p>I have a specific issue I think NoScript surrogates can help with but I&#8217;m having a hard time getting it to work.  If you have any ideas I&#8217;d love to hear them.</p>
<p>There is a page which does a check to see if it has been opened in a new window.  It does this in a page-level &lt;script&gt; element located in the &lt;head&gt; of the page. Inside this script element it does a check and then runs</p>
<p>document.write(&#8217;&lt;META HTTP-EQUIV=&quot;refresh&quot; CONTENT=&quot;0; URL=notallowed.html&quot;&gt;&#8217;);</p>
<p>I&#8217;ve gotten the page-level surrogate script to run, but haven&#8217;t been able to figure out a good way to cancel this out.  I&#8217;ve tried removing the element, but when the surrogate runs the script element doesn&#8217;t seem to even exist in DOM yet.  I&#8217;ve tried overriding the document.write function so it doesn&#8217;t do anything, but that doesn&#8217;t seem to carry over into the page scripts.</p>
<p>Since the browser begins the redirect as soon as the &lt;script&gt; element is parsed, so the only way I can think to accomplish this is with NoScript&#8217;s surrogates (since they happen early enough) but I&#8217;m wondering if maybe they happen *too* early?</p>
<p>Any tips would be great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hackademix.net » NoScript against Pop-unders</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-18913</link>
		<dc:creator>hackademix.net » NoScript against Pop-unders</dc:creator>
		<pubDate>Wed, 06 Jan 2010 21:36:05 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-18913</guid>
		<description>[...] some time now NoScript has been providing a page-level script surrogate to kill imagefap.com’s pop-unders. Actually, since most recent NoScript versions execute [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] some time now NoScript has been providing a page-level script surrogate to kill imagefap.com’s pop-unders. Actually, since most recent NoScript versions execute [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-17215</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 16 Dec 2009 15:29:56 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-17215</guid>
		<description>For people who find CS Lite under powered and want something that works more like No Script, you might try &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/4703" rel="nofollow"&gt;Cookie Monster&lt;/a&gt;.  I've found that Cookie Monster better handles the issues that caused trouble for me with CS Lite.  YMMV.  I vaguely recall fooling with the options to get it to work the way that I wanted (e.g. with second level domain names on).</description>
		<content:encoded><![CDATA[<p>For people who find CS Lite under powered and want something that works more like No Script, you might try <a href="https://addons.mozilla.org/en-US/firefox/addon/4703" rel="nofollow">Cookie Monster</a>.  I&#8217;ve found that Cookie Monster better handles the issues that caused trouble for me with CS Lite.  YMMV.  I vaguely recall fooling with the options to get it to work the way that I wanted (e.g. with second level domain names on).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giorgio</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16453</link>
		<dc:creator>Giorgio</dc:creator>
		<pubDate>Tue, 01 Dec 2009 23:13:00 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16453</guid>
		<description>@&lt;a href="http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16452" rel="nofollow"&gt;khopesh&lt;/a&gt;:
Likely. Just whitelist it in ABP.</description>
		<content:encoded><![CDATA[<p>@<a href="http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16452" rel="nofollow">khopesh</a>:<br />
Likely. Just whitelist it in ABP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: khopesh</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16452</link>
		<dc:creator>khopesh</dc:creator>
		<pubDate>Tue, 01 Dec 2009 22:06:59 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16452</guid>
		<description>It looks like NoScript (1.9.9.14) has this code by default, plus a little extra.  However, it doesn't work for me.  I presume that's because AdBlock Plus is nabbing it first?</description>
		<content:encoded><![CDATA[<p>It looks like NoScript (1.9.9.14) has this code by default, plus a little extra.  However, it doesn&#8217;t work for me.  I presume that&#8217;s because AdBlock Plus is nabbing it first?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jj</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16147</link>
		<dc:creator>jj</dc:creator>
		<pubDate>Wed, 18 Nov 2009 09:36:06 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16147</guid>
		<description>great tool!
im always happy to read the changelogs^^

thx from your swiss fans</description>
		<content:encoded><![CDATA[<p>great tool!<br />
im always happy to read the changelogs^^</p>
<p>thx from your swiss fans</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16143</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Wed, 18 Nov 2009 03:32:34 +0000</pubDate>
		<guid>http://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-16143</guid>
		<description>In case you're looking for &#34;new challenges&#34;, the following site goes into an endless update loop if I don't allow GA:

http://traffic.511.org/traffic_map.asp

I let them know what was causing the issue, but they don't seem to be inclined to fix it.

thanks...</description>
		<content:encoded><![CDATA[<p>In case you&#8217;re looking for &quot;new challenges&quot;, the following site goes into an endless update loop if I don&#8217;t allow GA:</p>
<p><a href="http://traffic.511.org/traffic_map.asp" rel="nofollow">http://traffic.511.org/traffic_map.asp</a></p>
<p>I let them know what was causing the issue, but they don&#8217;t seem to be inclined to fix it.</p>
<p>thanks&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
