From 8a9902e9b2dce0970aab5d7e835a2866d9999b03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Lucas?=
Date: Tue, 29 Jul 2014 22:25:27 +0200
Subject: [PATCH] Add another ugly hack to help Kindle. fix #165
You have to add the text-decoration none in each link to make the underline disappear .... crazy
---
JSON_renderer.php | 4 ++++
templates/default/bookdetail.html | 16 ++++++++--------
templates/default/footer.html | 8 ++++----
templates/default/header.html | 2 +-
templates/default/main.html | 8 ++++----
5 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/JSON_renderer.php b/JSON_renderer.php
index 4cec790..e5ddaae 100644
--- a/JSON_renderer.php
+++ b/JSON_renderer.php
@@ -154,6 +154,7 @@ class JSONRenderer
"config" => array (
"use_fancyapps" => $config ["cops_use_fancyapps"],
"max_item_per_page" => $config['cops_max_item_per_page'],
+ "kindleHack" => "",
"server_side_rendering" => useServerSideRendering (),
"html_tag_filter" => $config['cops_html_tag_filter']));
if ($config['cops_thumbnail_handling'] == "1") {
@@ -161,6 +162,9 @@ class JSONRenderer
} else if (!empty ($config['cops_thumbnail_handling'])) {
$out ["c"]["url"]["thumbnailUrl"] = $config['cops_thumbnail_handling'];
}
+ if (preg_match("/./", $_SERVER['HTTP_USER_AGENT'])) {
+ $out ["c"]["config"]["kindleHack"] = 'style="text-decoration: none !important;"';
+ }
return $out;
}
diff --git a/templates/default/bookdetail.html b/templates/default/bookdetail.html
index b9ed403..89c841b 100644
--- a/templates/default/bookdetail.html
+++ b/templates/default/bookdetail.html
@@ -1,24 +1,24 @@
{{?}}
{{? it.book.seriesName != ""}}
{{=htmlspecialchars (it.book.seriesCompleteName)}}
+ {{=htmlspecialchars (it.book.seriesCompleteName)}}
{{?}}
{{? it.book.publisherName != ""}}
{{=it.c.i18n.publisherName}}:
{{=htmlspecialchars (it.book.publisherName)}}
+ {{=it.c.i18n.publisherName}}:
{{=htmlspecialchars (it.book.publisherName)}}
{{?}}
{{? it.book.pubDate != ""}}
diff --git a/templates/default/footer.html b/templates/default/footer.html
index 8a589d7..70836f7 100644
--- a/templates/default/footer.html
+++ b/templates/default/footer.html
@@ -1,15 +1,15 @@
\ No newline at end of file
diff --git a/templates/default/header.html b/templates/default/header.html
index cfc00c7..f3a9b9e 100644
--- a/templates/default/header.html
+++ b/templates/default/header.html
@@ -1,5 +1,5 @@
-
+
{{? it.c.config.server_side_rendering == 0}}
diff --git a/templates/default/main.html b/templates/default/main.html
index bcbd614..f64c7b6 100644
--- a/templates/default/main.html
+++ b/templates/default/main.html
@@ -10,7 +10,7 @@
{{? it.containsBook == 0}}