added iframe detection (to remove the buton

This commit is contained in:
Bachir Soussi Chiadmi
2015-05-08 18:57:48 +02:00
parent 61b744fb00
commit 9917b00f22
+7 -5
View File
@@ -20,8 +20,8 @@ jQuery(document).ready(function($) {
_lastDraw = new Date, _lastDraw = new Date,
_fps, _fps,
_$nav_cursor, _$nav_cursor,
_History = window.History; // _History = window.History;
_isInIFrame = window.location !== window.parent.location;
var _$body = $('body'), var _$body = $('body'),
_is_mobile = $('html').is('.mobile'), _is_mobile = $('html').is('.mobile'),
@@ -122,9 +122,11 @@ jQuery(document).ready(function($) {
}; };
function initChapterWrapper(){ function initChapterWrapper(){
$('<div id="home-btn">') if(!_isInIFrame){
.on("click", onCloseChapterWrapper) $('<div id="home-btn">')
.appendTo(_$chapter_wrapper); .on("click", onCloseChapterWrapper)
.appendTo(_$chapter_wrapper);
}
}; };
function onCloseChapterWrapper(e){ function onCloseChapterWrapper(e){