diff --git a/plugins/googlefeed/popcorn.googlefeed.html b/plugins/googlefeed/popcorn.googlefeed.html deleted file mode 100755 index 290de5903..000000000 --- a/plugins/googlefeed/popcorn.googlefeed.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - Popcorn Google Feed Plug-in Demo - - - - - - -

Popcorn Google Feed Plug-in Demo

-

A Blog feed of Seneca's Planet Feed will be displayed from 0 seconds to 15 seconds

-

A Blog feed of pikiGeek's feed will be displayed from 5 seconds to 20 seconds

-
- -
-
-
-

Vertical Feed:

-
-
-

Horizontal Feed:

-
-
- - diff --git a/plugins/googlefeed/popcorn.googlefeed.js b/plugins/googlefeed/popcorn.googlefeed.js deleted file mode 100755 index 59241ee5e..000000000 --- a/plugins/googlefeed/popcorn.googlefeed.js +++ /dev/null @@ -1,190 +0,0 @@ -// PLUGIN: Google Feed -(function ( Popcorn ) { - - var i = 1, - scriptLoaded = false; - - /** - * googlefeed popcorn plug-in - * Adds a feed from the specified blog url at the target div - * Options parameter will need a start, end, target, url and title - * -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 DOM element that you want the map to appear in. This element must be in the DOM - * -Url is the url of the blog's feed you are trying to access - * -Title is the title of the blog you want displayed above the feed - * -Orientation is the orientation of the blog, accepts either Horizontal or Vertical, defaults to Vertical - * @param {Object} options - * - * Example: - var p = Popcorn("#video") - .googlefeed({ - start: 5, // seconds - end: 15, // seconds - target: "map", - url: "http://zenit.senecac.on.ca/~chris.tyler/planet/rss20.xml", - title: "Planet Feed" - } ) - * - */ - - Popcorn.plugin( "googlefeed", function( options ) { - - var dynamicFeedLoad = function() { - var dontLoad = false, - k = 0, - links = document.getElementsByTagName( "link" ), - len = links.length, - head = document.head || document.getElementsByTagName( "head" )[ 0 ], - css = document.createElement( "link" ), - resource = "//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol."; - - if ( !window.GFdynamicFeedControl ) { - - Popcorn.getScript( resource + "js", function() { - scriptLoaded = true; - }); - - } else { - scriptLoaded = true; - } - - // Checking if the css file is already included - for ( ; k < len; k++ ){ - if ( links[ k ].href === resource + "css" ) { - dontLoad = true; - } - } - - if ( !dontLoad ) { - css.type = "text/css"; - css.rel = "stylesheet"; - css.href = resource + "css"; - head.insertBefore( css, head.firstChild ); - } - }; - - if ( !window.google ) { - - Popcorn.getScript( "//www.google.com/jsapi", function() { - - google.load( "feeds", "1", { - - callback: function () { - - dynamicFeedLoad(); - } - }); - }); - - } else { - dynamicFeedLoad(); - } - - // create a new div and append it to the parent div so nothing - // that already exists in the parent div gets overwritten - var newdiv = document.createElement( "div" ), - target = document.getElementById( options.target ), - initialize = function() { - //ensure that the script has been loaded - if ( !scriptLoaded ) { - setTimeout( function () { - initialize(); - }, 5 ); - } else { - // Create the feed control using the user entered url and title - options.feed = new GFdynamicFeedControl( options.url, newdiv, { - vertical: options.orientation.toLowerCase() === "vertical" ? true : false, - horizontal: options.orientation.toLowerCase() === "horizontal" ? true : false, - title: options.title = options.title || "Blog" - }); - } - }; - - // Default to vertical orientation if empty or incorrect input - if( !options.orientation || ( options.orientation.toLowerCase() !== "vertical" && - options.orientation.toLowerCase() !== "horizontal" ) ) { - options.orientation = "vertical"; - } - - newdiv.style.display = "none"; - newdiv.id = "_feed" + i; - newdiv.style.width = "100%"; - newdiv.style.height = "100%"; - i++; - - target && target.appendChild( newdiv ); - - initialize(); - - options.toString = function() { - return options.url || options._natives.manifest.options.url[ "default" ]; - }; - - return { - /** - * @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 ){ - newdiv.setAttribute( "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 ){ - newdiv.setAttribute( "style", "display:none" ); - }, - _teardown: function( options ) { - document.getElementById( options.target ) && document.getElementById( options.target ).removeChild( newdiv ); - delete options.feed; - } - }; - }, - { - about: { - name: "Popcorn Google Feed Plugin", - version: "0.1", - author: "David Seifried", - website: "dseifried.wordpress.com" - }, - options: { - start: { - elem: "input", - type: "number", - label: "Start" - }, - end: { - elem: "input", - type: "number", - label: "End" - }, - target: "feed-container", - url: { - elem: "input", - type: "url", - label: "Feed URL", - "default": "http://planet.mozilla.org/rss20.xml" - }, - title: { - elem: "input", - type: "text", - label: "Title", - "default": "Planet Mozilla", - optional: true - }, - orientation: { - elem: "select", - options: [ "Vertical", "Horizontal" ], - label: "Orientation", - "default": "Vertical", - optional: true - } - } - }); -})( Popcorn ); diff --git a/plugins/googlefeed/popcorn.googlefeed.unit.html b/plugins/googlefeed/popcorn.googlefeed.unit.html deleted file mode 100755 index fdae7f80b..000000000 --- a/plugins/googlefeed/popcorn.googlefeed.unit.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - Popcorn API - - - - - - - - - - - -

Popcorn Google Feed Plugin

-

-
-

-
    -
    - - -
    -
    - - diff --git a/plugins/googlefeed/popcorn.googlefeed.unit.js b/plugins/googlefeed/popcorn.googlefeed.unit.js deleted file mode 100755 index 619d7013c..000000000 --- a/plugins/googlefeed/popcorn.googlefeed.unit.js +++ /dev/null @@ -1,99 +0,0 @@ -skip( "Popcorn Google Feed Plugin", function() { - - var popped = Popcorn( "#video" ), - expects = 12, - setupId, - count = 0; - - expect( expects ); - - function plus() { - if ( ++count === expects ) { - start(); - } - } - - stop(); - - ok ( "googlefeed" in popped, "googlefeed is a method of the popped instance" ); - plus(); - ok ( document.getElementById( "feed" ).innerHTML === "", "initially, there is nothing inside the feed" ); - plus(); - ok ( document.getElementById( "feed1" ).innerHTML === "", "initially, there is nothing inside the feed1" ); - plus(); - - popped.googlefeed({ - start: 1, - end: 2, - target: "feed", - url: "http://zenit.senecac.on.ca/~chris.tyler/planet/rss20.xml", - title: "Planet Feed" - }) - .googlefeed({ - start: 2, - end: 3, - target: "feed1", - url: "http://blog.pikimal.com/geek/feed/", - title: "pikiGeek", - orientation: "Horizontal" - }) - .volume( 0 ); - - setupId = popped.getLastTrackEventId(); - - popped.exec( 1, function() { - ok( google.load, "Google Feed is available" ); - plus(); - ok( GFdynamicFeedControl, "Dynamic Feed Control Available" ); - plus(); - ok( document.getElementById( "_feed1" ), "First feed is on the page" ); - plus(); - equal( document.getElementById( "_feed1" ).offsetParent.id, "feed", "First feed is inside the 'feed' div" ); - plus(); - equal( popped.data.trackEvents.byStart[ 1 ].orientation, "vertical", "Defaulting to vertical orientation" ); - plus(); - }); - popped.exec( 2, function() { - ok( document.getElementById( "_feed2" ), "Second feed is on the page" ); - plus(); - equal( document.getElementById( "_feed2" ).offsetParent.id, "feed1", "Second feed is inside the 'feed2' div" ); - plus(); - }); - popped.exec( 3, function() { - ok( document.getElementById( "_feed2" ).style.display === "none" && - document.getElementById( "_feed1" ).style.display === "none", "Both feeds are no lnger visible" ); - plus(); - - popped.pause().removeTrackEvent( setupId ); - ok( !document.getElementById( "feed1" ).children[ 0 ], "removed feed was properly destroyed" ); - plus(); - }); - - // empty track events should be safe - Popcorn.plugin.debug = true; - popped.googlefeed({}); - - popped.play(); - -}); - -asyncTest( "Overriding default toString", 2, function() { - var p = Popcorn( "#video" ), - urlText = "http://zenit.senecac.on.ca/~chris.tyler/planet/rss20.xml", - lastEvent; - - function testLastEvent( compareText, message ) { - lastEvent = p.getTrackEvent( p.getLastTrackEventId() ); - equal( lastEvent.toString(), compareText, message ); - } - - p.googlefeed({ - url: urlText - }); - testLastEvent( urlText, "Custom text displayed with toString" ); - - p.googlefeed({}); - testLastEvent( "http://planet.mozilla.org/rss20.xml", "Custom text displayed with toString using default" ); - - start(); -});