From 0565e9f34a8b4c36bc8c7e481d758a178e45b33c Mon Sep 17 00:00:00 2001 From: ScottDowne Date: Tue, 17 May 2011 15:30:53 -0400 Subject: [PATCH] [#421] removed getStyle from vimeo --- players/vimeo/popcorn.vimeo.html | 2 +- players/vimeo/popcorn.vimeo.js | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/players/vimeo/popcorn.vimeo.html b/players/vimeo/popcorn.vimeo.html index a55c36f..781fe7d 100644 --- a/players/vimeo/popcorn.vimeo.html +++ b/players/vimeo/popcorn.vimeo.html @@ -246,4 +246,4 @@
- \ No newline at end of file + diff --git a/players/vimeo/popcorn.vimeo.js b/players/vimeo/popcorn.vimeo.js index 012f309..0007c8c 100644 --- a/players/vimeo/popcorn.vimeo.js +++ b/players/vimeo/popcorn.vimeo.js @@ -229,11 +229,6 @@ var matches = url.match( rWebUrl ); return matches ? matches[0].substr(10) : ""; } - - // Gets the style for the given element - function getStyle( elem, styleProp ) { - return elem.style[styleProp]; - } function makeSwf( self, vidId, containerId ) { if ( !window.swfobject ) { @@ -305,9 +300,9 @@ this.evtHolder = new EventManager( this ); // For calculating position relative to video (like subtitles) - this.width = options.width || getStyle( this._target, "width" ) || "504px"; - this.height = options.height || getStyle( this._target, "height" ) || "340px"; - + this.width = options.width || this._target.style.width || "504px"; + this.height = options.height || this._target.style.height || "340px"; + if ( !/[\d]%/.test( this.width ) ) { this.offsetWidth = parseInt( this.width, 10 ); this._target.style.width = this.width + "px"; -- 2.43.0