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,
_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(){
$('<div id="home-btn">')
.on("click", onCloseChapterWrapper)
.appendTo(_$chapter_wrapper);
if(!_isInIFrame){
$('<div id="home-btn">')
.on("click", onCloseChapterWrapper)
.appendTo(_$chapter_wrapper);
}
};
function onCloseChapterWrapper(e){