<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Hey, I worked the revision into the code. Basically if you are browsing around the photos section it will do nothing if there are two 'photo.php's in the title. Here is the code. 

&lt;pre&gt;
// ==UserScript==
// @name          Facebook | URL Cleaner
// @namespace     http://www.theworldofstuff.com/greasemonkey/
// @description   Cleans Facebook URLs that don't actually take you to a new page.
// @include       http://*.facebook.com/*
// ==/UserScript==

window.gm_cleanURL = function() {
   // if the url is ugly
   var reg = /^(https?:\/\/([-a-z0-9]+\.)*facebook\.com)\/[^#]+#(\/.+)/i;
   
   // Photo exception added 4/15/09 by Ron Troyer
   // if the url is *photo.php*photo.php* 
   var photo = /.*photo\.php.*photo\.php.*/i;
   
	//change it if url is ugly and not photo page
   if ((reg.test(window.location.href)) &amp;&amp; (!(photo.test(window.location.href)))) {
      var foo = window.location.href.replace(reg,'$1$3');
      window.location.replace(foo);
   }
   // if not, wait till it is
   else {
      window.setTimeout(gm_cleanURL, 2000);
   }
}
gm_cleanURL();
&lt;/pre&gt;</body>
  <body-html>&lt;p&gt;Hey, I worked the revision into the code. Basically if you are browsing around the photos section it will do nothing if there are two 'photo.php's in the title. Here is the code. &lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
// ==UserScript==
// @name          Facebook | URL Cleaner
// @namespace     http://www.theworldofstuff.com/greasemonkey/
// @description   Cleans Facebook URLs that don't actually take you to a new page.
// @include       http://*.facebook.com/*
// ==/UserScript==

window.gm_cleanURL = function() {
   // if the url is ugly
   var reg = /^(https?:\/\/([-a-z0-9]+\.)*facebook\.com)\/[^#]+#(\/.+)/i;
   
   // Photo exception added 4/15/09 by Ron Troyer
   // if the url is *photo.php*photo.php* 
   var photo = /.*photo\.php.*photo\.php.*/i;
   
	//change it if url is ugly and not photo page
   if ((reg.test(window.location.href)) &amp;amp;&amp;amp; (!(photo.test(window.location.href)))) {
      var foo = window.location.href.replace(reg,'$1$3');
      window.location.replace(foo);
   }
   // if not, wait till it is
   else {
      window.setTimeout(gm_cleanURL, 2000);
   }
}
gm_cleanURL();
&lt;/pre&gt;&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-04-15T12:54:09Z</created-at>
  <forumable-id type="integer">29910</forumable-id>
  <forumable-type>Script</forumable-type>
  <id type="integer">111169</id>
  <topic-id type="integer">24527</topic-id>
  <updated-at type="datetime">2009-04-15T16:03:15Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">78033</user-id>
</post>
