<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>It might be nice to also have it remove the &quot;ref=??&quot; part of all Facebook URLs to stop it tracking how you are browsing the site.  I tried it myself with the following, but that just broke everything.

&lt;pre&gt;
var mylinks = $x( '//a[@href[contains(.,&quot;ref=&quot;)]]' );
mylinks.forEach( function( mylink ) {
	mylink.href = mylink.href.replace( /(.*)[\?&amp;]ref=\w\w/, unescape(RegExp.$1) );
});
&lt;/pre&gt;</body>
  <body-html>&lt;p&gt;It might be nice to also have it remove the &quot;ref=??&quot; part of all Facebook URLs to stop it tracking how you are browsing the site.  I tried it myself with the following, but that just broke everything.&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
var mylinks = $x( '//a[@href[contains(.,&quot;ref=&quot;)]]' );
mylinks.forEach( function( mylink ) {
	mylink.href = mylink.href.replace( /(.*)[\?&amp;amp;]ref=\w\w/, unescape(RegExp.$1) );
});
&lt;/pre&gt;&lt;/p&gt;</body-html>
  <created-at type="datetime">2007-07-16T12:15:39Z</created-at>
  <forumable-id type="integer">8733</forumable-id>
  <forumable-type>Script</forumable-type>
  <id type="integer">73665</id>
  <topic-id type="integer">17012</topic-id>
  <updated-at type="datetime">2008-11-17T00:19:42Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">30878</user-id>
</post>
