Author: johnh
Date: Mon May 10 23:30:20 2010
New Revision: 942949

URL: http://svn.apache.org/viewvc?rev=942949&view=rev
Log:
Taming Google Analytics feature.

Patch provided by Jas Nagra.


Added:
    
shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/taming.js
Modified:
    
shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml

Modified: 
shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml
URL: 
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml?rev=942949&r1=942948&r2=942949&view=diff
==============================================================================
--- 
shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml
 (original)
+++ 
shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml
 Mon May 10 23:30:20 2010
@@ -22,5 +22,6 @@ specific language governing permissions 
   <gadget>
     <script src="http://www.google.com/ig/lib/libga.js"/>
     <script src="analytics.js"/>
+    <script src="taming.js"/>
   </gadget>
 </feature>

Added: 
shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/taming.js
URL: 
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/taming.js?rev=942949&view=auto
==============================================================================
--- 
shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/taming.js
 (added)
+++ 
shindig/trunk/features/src/main/javascript/features/com.google.gadgets.analytics/taming.js
 Mon May 10 23:30:20 2010
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @class
+ * Tame and expose Google Analytics API to cajoled gadgets
+ */
+var tamings___ = tamings___ || [];
+tamings___.push(function(imports) {
+  caja___.whitelistCtors([
+      [gadgets, 'analytics', Object]
+  ]);
+  caja___.whitelistMeths([
+    [gadgets.analytics, 'reportPageview'],
+    [gadgets.analytics, 'reportEvent'],
+  ]);
+});


Reply via email to