includes/clientside/static/enano-lib-basic.js
changeset 824 28d9fbcd4f0d
parent 789 4a8fc835ba02
child 840 6b99e02ad577
--- a/includes/clientside/static/enano-lib-basic.js	Sun Jan 25 20:35:06 2009 -0500
+++ b/includes/clientside/static/enano-lib-basic.js	Sun Jan 25 20:35:32 2009 -0500
@@ -472,6 +472,19 @@
 /*!END_INCLUDER*/
 
 addOnloadHook(function() {
+  if ( $_REQUEST['auth'] )
+  {
+    var key = $_REQUEST['auth'];
+    var loc = String(window.location);
+    loc = loc.replace(/#.+$/, '').replace(/&auth=[0-9a-f]+/, '').replace(/\?auth=[0-9a-f]+(&)?/, '$1');
+    if ( key != 'false' )
+    {
+      var sep = loc.indexOf('?') != -1 ? '&' : '?';
+      loc = loc + sep + 'auth=' + key;
+    }
+    console.debug(loc);
+    window.location = loc;
+  }
   if ( $_REQUEST['do'] )
   {
     var act = $_REQUEST['do'];