зеркало из https://github.com/mozilla/popcorn-js.git
Fixed all linting errors on all plugins that had them
This commit is contained in:
Родитель
4719e9eae6
Коммит
820f539a1b
|
@ -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,
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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() {
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче