You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by do...@apache.org on 2008/03/18 17:02:16 UTC

svn commit: r638427 - /incubator/shindig/trunk/features/opensocial-0.7/jsoncontainer.js

Author: doll
Date: Tue Mar 18 09:02:11 2008
New Revision: 638427

URL: http://svn.apache.org/viewvc?rev=638427&view=rev
Log:
Used gadgets.util.getUrlParameters method to fetch the security token much more easily.



Modified:
    incubator/shindig/trunk/features/opensocial-0.7/jsoncontainer.js

Modified: incubator/shindig/trunk/features/opensocial-0.7/jsoncontainer.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/opensocial-0.7/jsoncontainer.js?rev=638427&r1=638426&r2=638427&view=diff
==============================================================================
--- incubator/shindig/trunk/features/opensocial-0.7/jsoncontainer.js (original)
+++ incubator/shindig/trunk/features/opensocial-0.7/jsoncontainer.js Tue Mar 18 09:02:11 2008
@@ -38,16 +38,7 @@
   this.environment_ = new opensocial.Environment(domain, supportedFieldsMap);
   this.baseUrl_ = baseUrl;
 
-  // TODO: Need to fix this for inlined gadgets as there is no URL.
-  var hash = document.location.hash || '#';
-  var hashData = hash.substring(1).split('&');
-  for (var i = 0; i < hashData.length; i++) {
-    var parts = hashData[i].split('=');
-    if (parts[0] == 'st') {
-      this.securityToken_ = parts[1];
-      break;
-    }
-  }
+  this.securityToken_ = gadgets.util.getUrlParameters().st;
 };
 JsonContainer.inherits(opensocial.Container);