]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
added manifest to linkedin plugin
authorChristopher De Cairos <chris.decairos@gmail.com>
Wed, 24 Aug 2011 15:51:10 +0000 (11:51 -0400)
committerChristopher De Cairos <chris.decairos@gmail.com>
Wed, 24 Aug 2011 15:51:10 +0000 (11:51 -0400)
plugins/linkedin/popcorn.linkedin.js

index 991fe64e74b251cf01ace5d28c01eb5479a4627e..f15e5eba6c41480f36bce01d251ab7cd1218cdc0 100755 (executable)
    * Start is the time that you want this plug-in to execute
    * End is the time that you want this plug-in to stop executing
    * Target is the id of the document element that the plugin needs to be attached to, this target element must exist on the DOM
-   * Type is the name of the plugin, options are share, memberprofile, companyinsider, companyprofile, or recommendproduct  
+   * Type is the name of the plugin, options are share, memberprofile, companyinsider, companyprofile, or recommendproduct
    * Apikey is your own api key from obtained from https://www.linkedin.com/secure/developer
    * Url is the desired url to share via LinkedIn. Defaults to the current page if no url is specified
    * Counter is the position where the counter will be positioned. This is used if the type is "share" or "recommendproduct"
    *  The options are right and top (don't include this option if you do not want a counter)
-   * Format is the data format of the member and company profile plugins. The options are inlined, hover, and click. Defaults to inline 
+   * Format is the data format of the member and company profile plugins. The options are inlined, hover, and click. Defaults to inline
    * Companyid must be specified if the type is "companyprofile," "companyinsider," or "recommendproduct"
    * Productid must be specified if the type is "recommendproduct"
-   * 
+   *
    * @param {Object} options
-   * 
+   *
    * Example:
    * <script src="popcorn.linkedin.js"></script>
    * ...
         website: "dsventura.blogspot.com"
       },
       options: {
-        type: { 
+        type: {
           elem: "input",
           type: "text",
           label: "Type"
-         },
+        },
+        url: {
+          elem: "input",
+          type: "text",
+          label: "URL",
+        },
+        apikey: {
+          elem: "input",
+          type: "text",
+          label: "API Key",
+        },
+        counter: {
+          elem: "input",
+          type: "text",
+          label: "Counter",
+        },
+        memberid: {
+          elem:"input",
+          type:"text",
+          label:"Member ID"
+        },
+        format: {
+          elem:"input",
+          type:"text",
+          label:"Format"
+        },
+        companyid: {
+          elem:"input",
+          type:"text",
+          label:"Company ID"
+        },
+        modules: {
+          elem:"input",
+          type:"text",
+          label:"Modules"
+        },
+        productid: {
+          elem:"input",
+          type:"text",
+          label:"productid"
+        },
+        related: {
+          elem:"input",
+          type:"text",
+          label:"related"
+        },
+        start: {
+          elem:"input",
+          type:"text",
+          label:"In"
+        },
+        end: {
+          elem:"input",
+          type:"text",
+          label:"Out"
+        },
+
         target: "linkedin-container"
       }
     },
           script = document.createElement( "script" );
 
       Popcorn.getScript("http://platform.linkedin.com/in.js");
-      
+
       options._container = document.createElement( "div" );
       options._container.appendChild( script );
-      
+
       if ( apikey ) {
         script.innerHTML = "api_key: " + apikey;
       }
-      
+
       options.type = options.type.toLowerCase();
-      
+
       // Replace the LinkedIn plugin's error message to something more helpful
       var errorMsg = function() {
 
         options._container.innerHTML = "Plugin requires a valid <a href='https://www.linkedin.com/secure/developer'>apikey</a>";
         document.getElementById( options.target ).appendChild( options._container );
       };
-      
+
       var setOptions = (function ( options ) {
 
         return {
           }
         };
       })( options );
-      
+
       if ( !apikey ) {
         errorMsg();
       } else {
         setOptions[ options.type ] && setOptions[ options.type ]();
       }
-      
+
       if ( document.getElementById( options.target ) ) {
         document.getElementById( options.target ).appendChild( options._container );
       }
      * The end function will be executed when the currentTime
      * of the video reaches the end time provided by the
      * options variable
-     */    
+     */
     end: function( event, options ) {
       options._container.parentNode.style.display = "none";
     },