]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
#332 Changed the code that creates the LinkedIn api script to make use of Popcorn...
authorMohammed Buttu <mohammedbuttu@gmail.com>
Tue, 17 May 2011 18:06:27 +0000 (14:06 -0400)
committerMohammed Buttu <mohammedbuttu@gmail.com>
Tue, 17 May 2011 18:06:27 +0000 (14:06 -0400)
plugins/linkedin/popcorn.linkedin.js

index 1442d926e06f6c4a048583fcb360c5052d4446e1..1ecce9af08fac420454c788f06c97508570a44d5 100644 (file)
       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" );