From 9917b00f22cc37b0907a2ac7dbf0873d5223e09a Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Fri, 8 May 2015 18:57:48 +0200 Subject: [PATCH] added iframe detection (to remove the buton --- sites/all/themes/gui/jee/js/jee.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sites/all/themes/gui/jee/js/jee.js b/sites/all/themes/gui/jee/js/jee.js index f185f4a..932ecf4 100755 --- a/sites/all/themes/gui/jee/js/jee.js +++ b/sites/all/themes/gui/jee/js/jee.js @@ -20,8 +20,8 @@ jQuery(document).ready(function($) { _lastDraw = new Date, _fps, _$nav_cursor, - _History = window.History; - + // _History = window.History; + _isInIFrame = window.location !== window.parent.location; var _$body = $('body'), _is_mobile = $('html').is('.mobile'), @@ -122,9 +122,11 @@ jQuery(document).ready(function($) { }; function initChapterWrapper(){ - $('
') - .on("click", onCloseChapterWrapper) - .appendTo(_$chapter_wrapper); + if(!_isInIFrame){ + $('
') + .on("click", onCloseChapterWrapper) + .appendTo(_$chapter_wrapper); + } }; function onCloseChapterWrapper(e){