includes/clientside/static/enano-lib-basic.js
changeset 827 2c20563245b2
parent 824 28d9fbcd4f0d
child 840 6b99e02ad577
--- a/includes/clientside/static/enano-lib-basic.js	Sun Jan 25 21:20:14 2009 -0500
+++ b/includes/clientside/static/enano-lib-basic.js	Sun Jan 25 21:21:07 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'];