]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
Fixed all linting errors on all plugins that had them
authorDavid Seifried <david.c.seifried@gmail.com>
Fri, 23 Sep 2011 14:47:54 +0000 (10:47 -0400)
committerDavid Seifried <david.c.seifried@gmail.com>
Fri, 23 Sep 2011 14:47:54 +0000 (10:47 -0400)
plugins/googlefeed/popcorn.googlefeed.unit.js
plugins/linkedin/popcorn.linkedin.unit.js
plugins/mustache/popcorn.mustache.unit.js
plugins/openmap/popcorn.openmap.unit.js
plugins/subtitle/popcorn.subtitle.unit.js
plugins/timeline/popcorn.timeline.unit.js
plugins/twitter/popcorn.twitter.unit.js
plugins/wikipedia/popcorn.wikipedia.unit.js

index 3b8817f3efe2a06e007e95dad4a8e99ff798a287..bb612bffb93fd168e863bd82f67afffd969c9788 100755 (executable)
@@ -27,7 +27,7 @@ test( "Popcorn Google Feed Plugin", function() {
     end: 2,
     target: "feed",
     url: "http://zenit.senecac.on.ca/~chris.tyler/planet/rss20.xml",
-    title: "Planet Feed",
+    title: "Planet Feed"
        })
        .googlefeed({
     start: 2,
index 3c0cdd63b3729ff12bbd410ec0c961e9c6faeb2d..47e422e7caf69bab4ae1b5ba55f4c421e9927e60 100755 (executable)
@@ -1,5 +1,12 @@
 test( "Popcorn LinkedIn Plugin", function() {
 
+  function plus() {
+
+    if ( ++count === expects ) {
+      start();
+    }
+  }
+
   if ( /localhost/.test( location.hostname ) ) {
 
     // run tests on localhost
@@ -15,13 +22,6 @@ test( "Popcorn LinkedIn Plugin", function() {
 
     expect( expects );
 
-    function plus() {
-
-      if ( ++count === expects ) {
-        start();
-      }
-    }
-
     stop();
 
     ok( "linkedin" in popped, "linkedin is a method of the popped instance" );
index 1829511f551950305f9e608e15583f6280495c64..3ef5edce19fab19a50fa0552a4a344c24ccb6bb3 100755 (executable)
@@ -41,7 +41,7 @@ test( "Popcorn Mustache Plugin", function() {
     data: function( plugin, options ) {
       return JSON.parse( '{"heading": "mustache - test 2/3"}' );
     },
-    target: "mustache-div",
+    target: "mustache-div"
   });
 
   // Template + Object literal
@@ -57,7 +57,8 @@ test( "Popcorn Mustache Plugin", function() {
   });
 
   var video = document.getElementById( "video" );
-  var two = six = ten = false;
+  var two, six, ten;
+      two = six = ten = false;
 
   video.addEventListener( "timeupdate", function() {
 
index 21cd6aa93983984b48a18ee482f4151e9f971416..220edb5e003f117125e159fc0db4e00692e196da 100755 (executable)
@@ -39,7 +39,7 @@ test( "Popcorn OpenMap Plugin", function() {
     start: 0,
     end: 4,
     type: "SATELLITE",
-    target: :map2",
+    target: "map2",
     lat: 40.943926,
     lng: -78.968525,
     zoom: 9
index 82a8b290656bb018ef8b4d002bf65e453cb9f95a..aa0c67925b615b0c752106e7766ac16da013db89 100755 (executable)
@@ -25,17 +25,17 @@ test( "Popcorn Subtitle Plugin", function() {
   popped.subtitle({
       start: 0,
       end: 2,
-      text: "this is the first subtitle of 2011",
+      text: "this is the first subtitle of 2011"
     })
   .subtitle({
       start: 2,
       end: 4,
-      text: "this is the second subtitle of 2011",
+      text: "this is the second subtitle of 2011"
     })
   .subtitle({
       start: 5,
       end: 7,
-      text: "this is the third subtitle of 2011",
+      text: "this is the third subtitle of 2011"
     } )
     .volume( 0 )
     .play();
index ec054680b1250389da04bec1bcca1c0df03f6688..176c30aa2aaf7c159fad5a6697dfa318faa78ba2 100644 (file)
@@ -2,7 +2,8 @@ test( "Popcorn Timeline Plugin", function() {
 
   var popped = Popcorn( "#video" ),
       expects = 17,
-      upIds = downIds = [],
+      upIds = [],
+      downIds = [],
       count = 0,
       timelineUp = document.getElementById( "timeline-up" ),
       timelineDown = document.getElementById( "timeline-down" );
@@ -108,10 +109,10 @@ test( "Popcorn Timeline Plugin", function() {
          plus();
 
     var uid, did;
-    while ( uid = upIds.pop() ) {
+    while ( uid === upIds.pop() ) {
       popped.removeTrackEvent( uid );
     }
-    while ( did = downIds.pop() ) {
+    while ( did === downIds.pop() ) {
       popped.removeTrackEvent( did );
     }
 
index 90d27f222d41c879aed4dc220098bbf04d0926f6..2feda17facc7b8c9e235cfce7fa6871460c19403 100755 (executable)
@@ -27,14 +27,14 @@ test( "Popcorn Twitter Plugin", function() {
     ok( TWTR, "Twitter constructor exists" );
     plus();
 
-  } catch ( e ) {};
+  } catch ( e ) {}
 
   popped.twitter({
     start: 1,
     end: 2,
     title: "Steve Song",
     src: "@stevesong",
-    target: "twitterdiv",
+    target: "twitterdiv"
   });
 
   setupId = popped.getLastTrackEventId();
index 62e501050b425561e0678ca61606ef45db8fdfbd..6fa4e80cfa9c2c7b13f0bbd608e06a6efb693418 100755 (executable)
@@ -49,7 +49,7 @@ test( "Popcorn wikipedia Plugin", function() {
     notEqual( theArticle.children[ 1 ].innerHTML, "", "wikidiv has some content" );
     plus();
     // subtract 1 from length for the  '...' added in by the plugin
-    equals( theArticle.children[ 1 ].innerHTML.split( " " ).length -1, 22, "wikidiv contains 22 words" )
+    equals( theArticle.children[ 1 ].innerHTML.split( " " ).length -1, 22, "wikidiv contains 22 words" );
     plus();
   });