From 10433ddc0bbb9ed306351ce3be78014ca5ef2ce2 Mon Sep 17 00:00:00 2001 From: Anna Sobiepanek Date: Thu, 17 Mar 2011 16:50:08 -0400 Subject: [PATCH] fixed linting errors [#392] --- plugins/code/popcorn.code.js | 6 +++--- plugins/googlefeed/popcorn.googlefeed.js | 2 +- plugins/lowerthird/popcorn.lowerthird.js | 6 +++--- plugins/openmap/popcorn.openmap.js | 2 +- plugins/subtitle/popcorn.subtitle.js | 2 +- plugins/webpage/popcorn.webpage.js | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/code/popcorn.code.js b/plugins/code/popcorn.code.js index 077d401..0fa5cc7 100644 --- a/plugins/code/popcorn.code.js +++ b/plugins/code/popcorn.code.js @@ -101,15 +101,15 @@ } )(); - if ( !options.onStart || !( typeof options.onStart === 'function' ) ) { + if ( !options.onStart || typeof options.onStart !== 'function' ) { throw 'Popcorn Code Plugin Error: onStart must be a function.'; } - if ( options.onEnd && !( typeof options.onEnd === 'function' ) ) { + if ( options.onEnd && typeof options.onEnd !== 'function' ) { throw 'Popcorn Code Plugin Error: onEnd must be a function.'; } - if ( options.onFrame && !( typeof options.onFrame === 'function' ) ) { + if ( options.onFrame && typeof options.onFrame !== 'function' ) { throw 'Popcorn Code Plugin Error: onFrame must be a function.'; } diff --git a/plugins/googlefeed/popcorn.googlefeed.js b/plugins/googlefeed/popcorn.googlefeed.js index 5ea9468..29d7b59 100644 --- a/plugins/googlefeed/popcorn.googlefeed.js +++ b/plugins/googlefeed/popcorn.googlefeed.js @@ -67,7 +67,7 @@ }, 5); } else { // Create the feed control using the user entered url and title - new GFdynamicFeedControl( options.url, newdiv, { + var tmp = 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" diff --git a/plugins/lowerthird/popcorn.lowerthird.js b/plugins/lowerthird/popcorn.lowerthird.js index d655ee5..c2072db 100644 --- a/plugins/lowerthird/popcorn.lowerthird.js +++ b/plugins/lowerthird/popcorn.lowerthird.js @@ -33,18 +33,18 @@ // just a little tool function // calculates the top and left position of an element var offset = function(elem) { - if(!elem) elem = this; + if ( !elem ) { elem = this; } var x = elem.offsetLeft; var y = elem.offsetTop; - while (elem = elem.offsetParent) { + while ( elem === elem.offsetParent ) { x += elem.offsetLeft; y += elem.offsetTop; } return { left: x, top: y }; - } + }; Popcorn.plugin( "lowerthird" , { diff --git a/plugins/openmap/popcorn.openmap.js b/plugins/openmap/popcorn.openmap.js index 1a65bb7..afbc3a1 100644 --- a/plugins/openmap/popcorn.openmap.js +++ b/plugins/openmap/popcorn.openmap.js @@ -102,7 +102,7 @@ var openmapCallback; } else if( options.type == "SATELLITE" ) { // add NASA WorldWind / LANDSAT map - map = new OpenLayers.Map( { div: newdiv, "maxResolution": .28125, tileSize: new OpenLayers.Size( 512, 512 ) } ); + map = new OpenLayers.Map( { div: newdiv, "maxResolution": 0.28125, tileSize: new OpenLayers.Size( 512, 512 ) } ); var worldwind = new OpenLayers.Layer.WorldWind( "LANDSAT", "http://worldwind25.arc.nasa.gov/tile/tile.aspx", 2.25, 4, { T: "105" } ); map.addLayer( worldwind ); displayProjection = new OpenLayers.Projection( "EPSG:4326" ); diff --git a/plugins/subtitle/popcorn.subtitle.js b/plugins/subtitle/popcorn.subtitle.js index 2dbfaae..c6db4f2 100644 --- a/plugins/subtitle/popcorn.subtitle.js +++ b/plugins/subtitle/popcorn.subtitle.js @@ -66,7 +66,7 @@ do { left += obj.offsetLeft; top += obj.offsetTop; - } while (obj = obj.offsetParent); + } while (obj === obj.offsetParent); } return { left : left, diff --git a/plugins/webpage/popcorn.webpage.js b/plugins/webpage/popcorn.webpage.js index 0d02fad..54861ad 100644 --- a/plugins/webpage/popcorn.webpage.js +++ b/plugins/webpage/popcorn.webpage.js @@ -44,7 +44,7 @@ }, _setup : function( options ) { // make an iframe - options._iframe = document.createElement( 'iframe' ), + options._iframe = document.createElement( 'iframe' ); options._iframe.setAttribute('width', "100%"); options._iframe.setAttribute('height', "100%"); options._iframe.id = options.id; -- 2.43.0