From d53c1877ea13ac2bacdae0411914b81f2abde675 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 30 Apr 2014 16:02:19 +0200 Subject: [PATCH] Removed deprecated resize loop. Should not be needed anymore. --- js/h5p.js | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index c94845d..9f7ea99 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -131,29 +131,7 @@ H5P.init = function () { // Insert H5Ps that should be in iframes. H5P.jQuery("iframe.h5p-iframe").each(function () { - var $iframe = H5P.jQuery(this); - var contentId = $iframe.data('content-id'); - - // DEPRECATED AND WILL BE REMOVED. MAKE SURE YOUR H5Ps EXPOSES A $ AND A resize FUNCTION. - $iframe.ready(function () { - resizeIframeInterval = setInterval(function () { - if (H5P.isFullscreen) { - return; - } - - var $doc = $iframe.contents(); - var contentHeight = $doc.height(); - var frameHeight = $iframe.innerHeight(); - - - if (frameHeight !== contentHeight) { - $iframe.css('height', contentHeight + 'px'); - $doc[0].documentElement.style.overflow = 'hidden'; - } - }, 500); - }); - // END DEPRECATION - + var contentId = H5P.jQuery(this).data('content-id'); this.contentDocument.open(); this.contentDocument.write('' + H5PIntegration.getHeadTags(contentId) + '
'); this.contentDocument.close();