]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#522] Fixed script issue, set the loading of one script as the callback of another...
authorDavid Seifried <david.c.seifried@gmail.com>
Fri, 3 Jun 2011 15:19:00 +0000 (11:19 -0400)
committerDavid Seifried <david.c.seifried@gmail.com>
Fri, 3 Jun 2011 20:15:19 +0000 (16:15 -0400)
plugins/googlefeed/popcorn.googlefeed.js
plugins/googlefeed/popcorn.googlefeed.unit.html

index 1e9c0f30566c439dc6abd65136451f2ab5545a2f..409f1cf86d2b74df1c18f4adb28d7d8195f76474 100644 (file)
@@ -8,7 +8,15 @@
 
         if ( typeof google !== 'undefined' && google.load ) {
 
-          google.load( "feeds", "1", { callback: function () { scriptLoaded = true; } } );
+          google.load( "feeds", "1", {
+            callback: function () {
+            
+              Popcorn.getScript( "http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js", function() {
+
+                scriptLoaded = true;
+              }); 
+            }
+          });
         } else {
 
           setTimeout( function() {
@@ -75,7 +83,6 @@
       scriptLoading = true;
     
       Popcorn.getScript( "http://www.google.com/jsapi", callBack );
-      Popcorn.getScript( "http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js" );
 
       //Doing this because I cannot find something similar to getScript() for css files
       var head = document.getElementsByTagName("head")[0];
index ba1db97d2d7ef8e7113afad586a2c77206a23c0e..9bfc36b2e82f648d5bc211d1dc73a277c7676f5b 100644 (file)
@@ -8,7 +8,6 @@
     do not move - this must be called immediately prior to 
     popcorn-api-draft.js
   -->
-  <script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js"></script>
   <script src="../../popcorn.js"></script>
   <script src="popcorn.googlefeed.js"></script>