From 3ebc6ef5eb4a316471c3267ba0ac0de096bae63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Sat, 21 Jul 2012 15:23:49 +0200 Subject: [PATCH] Now that tha Kobo can handle properly Fancybox : * Add a detection for e-Ink browser * Remove effect for e-Ink browser (fewer refresh needed) * Handle the margin to allow closing of Fancyboxes --- index.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 10c2eef..8570e52 100644 --- a/index.php +++ b/index.php @@ -21,6 +21,7 @@ $currentPage = Page::getPage ($page, $qid, $query); $currentPage->InitializeContent (); + $isEink = preg_match ("/(Kobo Touch|Kindle\/3.0)/", $_SERVER['HTTP_USER_AGENT']); ?> @@ -56,11 +57,7 @@ $(".fancycover").fancybox({ 'type' : 'image', - openEffect : 'none', - closeEffect : 'none', - helpers : { - overlay : null - } + }); $("#searchImage").click(function(){ @@ -74,7 +71,11 @@ $(".bookdetail").click(function(){ var url = $(this).find("a").attr("href"); $('#content').load(url, function(data, stat, req){ - $.fancybox( {content: data, maxWidth : '700' } ); + $.fancybox( { + content: data, + maxWidth : '700', + + } ); }); return false;