} )
*
*/
- Popcorn.plugin( "webpage" , (function(){
-
- return {
- manifest: {
- about:{
- name: "Popcorn Webpage Plugin",
- version: "0.1",
- author: "@annasob",
- website: "annasob.wordpress.com"
- },
- options:{
- id : {elem:'input', type:'text', label:'Id'},
- start : {elem:'input', type:'text', label:'In'},
- end : {elem:'input', type:'text', label:'Out'},
- src : {elem:'input', type:'text', label:'Src'},
- target : 'iframe-container'
- }
+ Popcorn.plugin( "webpage" , {
+ manifest: {
+ about:{
+ name: "Popcorn Webpage Plugin",
+ version: "0.1",
+ author: "@annasob",
+ website: "annasob.wordpress.com"
},
- _setup : function( options ) {
- // make an iframe
- options._iframe = document.createElement( 'iframe' ),
- options._iframe.setAttribute('width', "100%");
- options._iframe.setAttribute('height', "100%");
- options._iframe.id = options.id;
- options._iframe.src = options.src;
- options._iframe.style.display = 'none';
- // add the hidden iframe to the DOM
- if ( document.getElementById( options.target ) ) {
- document.getElementById( options.target ).appendChild(options._iframe);
- }
-
- },
- /**
- * @member webpage
- * The start function will be executed when the currentTime
- * of the video reaches the start time provided by the
- * options variable
- */
- start: function(event, options){
- // make the iframe visible
- options._iframe.style.display = 'inline';
- },
- /**
- * @member webpage
- * 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){
- // make the iframe invisible
- options._iframe.style.display = 'none';
+ options:{
+ id : {elem:'input', type:'text', label:'Id'},
+ start : {elem:'input', type:'text', label:'In'},
+ end : {elem:'input', type:'text', label:'Out'},
+ src : {elem:'input', type:'text', label:'Src'},
+ target : 'iframe-container'
+ }
+ },
+ _setup : function( options ) {
+ // make an iframe
+ options._iframe = document.createElement( 'iframe' ),
+ options._iframe.setAttribute('width', "100%");
+ options._iframe.setAttribute('height', "100%");
+ options._iframe.id = options.id;
+ options._iframe.src = options.src;
+ options._iframe.style.display = 'none';
+ // add the hidden iframe to the DOM
+ if ( document.getElementById( options.target ) ) {
+ document.getElementById( options.target ).appendChild(options._iframe);
}
- };
+ },
+ /**
+ * @member webpage
+ * The start function will be executed when the currentTime
+ * of the video reaches the start time provided by the
+ * options variable
+ */
+ start: function(event, options){
+ // make the iframe visible
+ options._iframe.style.display = 'inline';
+ },
+ /**
+ * @member webpage
+ * 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){
+ // make the iframe invisible
+ options._iframe.style.display = 'none';
+ }
- })());
-
-})( Popcorn );
\ No newline at end of file
+ });
+})( Popcorn );