From: Mohammed Buttu Date: Tue, 17 May 2011 18:06:27 +0000 (-0400) Subject: #332 Changed the code that creates the LinkedIn api script to make use of Popcorn... X-Git-Tag: v0.6~15 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2659c41aa6185ea14071016c63b4be1f22d62466;p=popcorn-js.git #332 Changed the code that creates the LinkedIn api script to make use of Popcorn.getScript --- diff --git a/plugins/linkedin/popcorn.linkedin.js b/plugins/linkedin/popcorn.linkedin.js index 1442d92..1ecce9a 100644 --- a/plugins/linkedin/popcorn.linkedin.js +++ b/plugins/linkedin/popcorn.linkedin.js @@ -60,22 +60,7 @@ var apikey = options.apikey, target = document.getElementById( options.target ); - if ( !document.getElementById( "linkedin-root" ) ) { - - var root = document.createElement( "div" ); - - root.setAttribute( "div", "linkedin-root" ); - document.body.appendChild( root ); - - (function() { - - var linkedinAPIScript = document.createElement( "script" ); - linkedinAPIScript.setAttribute( "src", "http://platform.linkedin.com/in.js" ); - linkedinAPIScript.setAttribute( "type", "text/javascript" ); - linkedinAPIScript.setAttribute( "async", "true" ); - root.appendChild( linkedinAPIScript ); - }()); - } + Popcorn.getScript("http://platform.linkedin.com/in.js"); options._container = document.createElement( "script" );