From 1d18ad8e04663740cadd77be8c1d7f526f3014d4 Mon Sep 17 00:00:00 2001 From: David Seifried Date: Fri, 3 Jun 2011 11:19:00 -0400 Subject: [PATCH] [#522] Fixed script issue, set the loading of one script as the callback of another script to fix issues --- plugins/googlefeed/popcorn.googlefeed.js | 11 +++++++++-- plugins/googlefeed/popcorn.googlefeed.unit.html | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/googlefeed/popcorn.googlefeed.js b/plugins/googlefeed/popcorn.googlefeed.js index 1e9c0f3..409f1cf 100644 --- a/plugins/googlefeed/popcorn.googlefeed.js +++ b/plugins/googlefeed/popcorn.googlefeed.js @@ -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]; diff --git a/plugins/googlefeed/popcorn.googlefeed.unit.html b/plugins/googlefeed/popcorn.googlefeed.unit.html index ba1db97..9bfc36b 100644 --- a/plugins/googlefeed/popcorn.googlefeed.unit.html +++ b/plugins/googlefeed/popcorn.googlefeed.unit.html @@ -8,7 +8,6 @@ do not move - this must be called immediately prior to popcorn-api-draft.js --> - -- 2.43.0