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
This commit is contained in:
parent
3aebffc217
commit
8a9902e9b2
|
@ -154,6 +154,7 @@ class JSONRenderer
|
||||||
"config" => array (
|
"config" => array (
|
||||||
"use_fancyapps" => $config ["cops_use_fancyapps"],
|
"use_fancyapps" => $config ["cops_use_fancyapps"],
|
||||||
"max_item_per_page" => $config['cops_max_item_per_page'],
|
"max_item_per_page" => $config['cops_max_item_per_page'],
|
||||||
|
"kindleHack" => "",
|
||||||
"server_side_rendering" => useServerSideRendering (),
|
"server_side_rendering" => useServerSideRendering (),
|
||||||
"html_tag_filter" => $config['cops_html_tag_filter']));
|
"html_tag_filter" => $config['cops_html_tag_filter']));
|
||||||
if ($config['cops_thumbnail_handling'] == "1") {
|
if ($config['cops_thumbnail_handling'] == "1") {
|
||||||
|
@ -161,6 +162,9 @@ class JSONRenderer
|
||||||
} else if (!empty ($config['cops_thumbnail_handling'])) {
|
} else if (!empty ($config['cops_thumbnail_handling'])) {
|
||||||
$out ["c"]["url"]["thumbnailUrl"] = $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;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
<article class="bookpopup">
|
<article class="bookpopup">
|
||||||
<span class="cover">
|
<span class="cover">
|
||||||
{{? it.book.hasCover == 1}}
|
{{? it.book.hasCover == 1}}
|
||||||
<a href="{{=it.book.coverurl}}">
|
<a href="{{=it.book.coverurl}}" {{=it.c.config.kindleHack}}>
|
||||||
<img src="{{=it.book.thumbnailurl}}" alt="{{=it.c.i18n.coverAlt}}" />
|
<img src="{{=it.book.thumbnailurl}}" alt="{{=it.c.i18n.coverAlt}}" />
|
||||||
</a>
|
</a>
|
||||||
{{?}}
|
{{?}}
|
||||||
</span>
|
</span>
|
||||||
<h2 class="download">
|
<h2 class="download">
|
||||||
{{~it.book.datas:data:i}}
|
{{~it.book.datas:data:i}}
|
||||||
<a href="{{=data.url}}">{{=data.format}}</a>
|
<a href="{{=data.url}}" {{=it.c.config.kindleHack}}>{{=data.format}}</a>
|
||||||
{{? data.mail == 1}}
|
{{? data.mail == 1}}
|
||||||
<a id="mailButton" title="Mail" href="empty.php" onclick="sendToMailAddress (this, {{=data.id}}); return false;"><i class="icon-envelope icon-large"></i></a>
|
<a id="mailButton" title="Mail" href="empty.php" onclick="sendToMailAddress (this, {{=data.id}}); return false;" {{=it.c.config.kindleHack}}><i class="icon-envelope icon-large"></i></a>
|
||||||
{{?}}
|
{{?}}
|
||||||
{{? data.readerUrl != ""}}
|
{{? data.readerUrl != ""}}
|
||||||
<a title="Reader" href="{{=data.readerUrl}}" target="blank"><i class="icon-eye-open icon-large"></i></a>
|
<a title="Reader" href="{{=data.readerUrl}}" target="blank" {{=it.c.config.kindleHack}}><i class="icon-eye-open icon-large"></i></a>
|
||||||
{{?}}
|
{{?}}
|
||||||
<br />
|
<br />
|
||||||
{{~}}
|
{{~}}
|
||||||
</h2>
|
</h2>
|
||||||
<h1><a title="{{=it.c.i18n.permalinkAlt}}" rel="bookmark" href="{{=str_format (it.c.url.detailUrl, it.book.id, it.databaseId)}}"><i class="icon-link"></i></a>{{=htmlspecialchars (it.title)}}</h1>
|
<h1><a title="{{=it.c.i18n.permalinkAlt}}" rel="bookmark" href="{{=str_format (it.c.url.detailUrl, it.book.id, it.databaseId)}}" {{=it.c.config.kindleHack}}><i class="icon-link"></i></a>{{=htmlspecialchars (it.title)}}</h1>
|
||||||
<p class="popupless">
|
<p class="popupless">
|
||||||
<h3>{{=it.c.i18n.authorsTitle}}: </h3>
|
<h3>{{=it.c.i18n.authorsTitle}}: </h3>
|
||||||
{{~it.book.authors:author:i}}
|
{{~it.book.authors:author:i}}
|
||||||
|
@ -29,18 +29,18 @@
|
||||||
<p class="popupless">
|
<p class="popupless">
|
||||||
<h3>{{=it.c.i18n.tagsTitle}}: </h3>
|
<h3>{{=it.c.i18n.tagsTitle}}: </h3>
|
||||||
{{~it.book.tags:tag:i}}
|
{{~it.book.tags:tag:i}}
|
||||||
{{? i > 0}}, {{?}}<a href="{{=tag.url}}">{{=htmlspecialchars (tag.name)}}</a>
|
{{? i > 0}}, {{?}}<a href="{{=tag.url}}" {{=it.c.config.kindleHack}}>{{=htmlspecialchars (tag.name)}}</a>
|
||||||
{{~}}
|
{{~}}
|
||||||
</p>
|
</p>
|
||||||
{{?}}
|
{{?}}
|
||||||
{{? it.book.seriesName != ""}}
|
{{? it.book.seriesName != ""}}
|
||||||
<p class="popupless">
|
<p class="popupless">
|
||||||
<h3><a href="{{=it.book.seriesurl}}">{{=it.c.i18n.seriesTitle}}</a> : </h3>{{=htmlspecialchars (it.book.seriesCompleteName)}}
|
<h3><a href="{{=it.book.seriesurl}}" {{=it.c.config.kindleHack}}>{{=it.c.i18n.seriesTitle}}</a> : </h3>{{=htmlspecialchars (it.book.seriesCompleteName)}}
|
||||||
</p>
|
</p>
|
||||||
{{?}}
|
{{?}}
|
||||||
{{? it.book.publisherName != ""}}
|
{{? it.book.publisherName != ""}}
|
||||||
<p class="popupless">
|
<p class="popupless">
|
||||||
<h3>{{=it.c.i18n.publisherName}}: </h3><a href="{{=it.book.publisherurl}}">{{=htmlspecialchars (it.book.publisherName)}}</a>
|
<h3>{{=it.c.i18n.publisherName}}: </h3><a href="{{=it.book.publisherurl}}" {{=it.c.config.kindleHack}}>{{=htmlspecialchars (it.book.publisherName)}}</a>
|
||||||
</p>
|
</p>
|
||||||
{{?}}
|
{{?}}
|
||||||
{{? it.book.pubDate != ""}}
|
{{? it.book.pubDate != ""}}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<footer>
|
<footer>
|
||||||
<div class="footleft">
|
<div class="footleft">
|
||||||
<a href="index.php?page=19"><div title="{{=it.c.i18n.customizeTitle}}" class="hicon hicon32"><i class="icon-wrench icon-2x"></i></div></a>
|
<a href="index.php?page=19" {{=it.c.config.kindleHack}}><div title="{{=it.c.i18n.customizeTitle}}" class="hicon hicon32"><i class="icon-wrench icon-2x"></i></div></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="footright">
|
<div class="footright">
|
||||||
<a class="fancyabout" href="{{=it.abouturl}}"><div title="{{=it.c.i18n.aboutTitle}}" class="hicon hicon32"><i class="icon-info-sign icon-2x"></i></div></a>
|
<a class="fancyabout" href="{{=it.abouturl}}" {{=it.c.config.kindleHack}}><div title="{{=it.c.i18n.aboutTitle}}" class="hicon hicon32"><i class="icon-info-sign icon-2x"></i></div></a>
|
||||||
</div>
|
</div>
|
||||||
{{? it.isPaginated == 1}}
|
{{? it.isPaginated == 1}}
|
||||||
<div class="footcenter">
|
<div class="footcenter">
|
||||||
{{? it.prevLink != ""}}<a id="prevLink" href="{{=it.prevLink}}" ><div title="{{=it.c.i18n.previousAlt}}" class="hicon hicon32"><i class="icon-angle-left icon-2x"></i></div></a>{{?}}
|
{{? it.prevLink != ""}}<a id="prevLink" href="{{=it.prevLink}}" {{=it.c.config.kindleHack}}><div title="{{=it.c.i18n.previousAlt}}" class="hicon hicon32"><i class="icon-angle-left icon-2x"></i></div></a>{{?}}
|
||||||
<p> {{=it.currentPage}} / {{=it.maxPage}} </p>
|
<p> {{=it.currentPage}} / {{=it.maxPage}} </p>
|
||||||
{{? it.nextLink != ""}}<a id="nextLink" href="{{=it.nextLink}}" ><div title="{{=it.c.i18n.nextAlt}}" class="hicon hicon32"><i class="icon-angle-right icon-2x"></i></div></a>{{?}}
|
{{? it.nextLink != ""}}<a id="nextLink" href="{{=it.nextLink}}" {{=it.c.config.kindleHack}}><div title="{{=it.c.i18n.nextAlt}}" class="hicon hicon32"><i class="icon-angle-right icon-2x"></i></div></a>{{?}}
|
||||||
</div>
|
</div>
|
||||||
{{?}}
|
{{?}}
|
||||||
</footer>
|
</footer>
|
|
@ -1,5 +1,5 @@
|
||||||
<header>
|
<header>
|
||||||
<a class="headleft" href="{{=it.homeurl}}">
|
<a class="headleft" href="{{=it.homeurl}}" {{=it.c.config.kindleHack}}>
|
||||||
<div title="{{=it.c.i18n.homeAlt}}" class="hicon hicon64"><i class="icon-home"></i></div>
|
<div title="{{=it.c.i18n.homeAlt}}" class="hicon hicon64"><i class="icon-home"></i></div>
|
||||||
</a>
|
</a>
|
||||||
{{? it.c.config.server_side_rendering == 0}}
|
{{? it.c.config.server_side_rendering == 0}}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{{? it.containsBook == 0}}
|
{{? it.containsBook == 0}}
|
||||||
<article>
|
<article>
|
||||||
<div class="frontpage">
|
<div class="frontpage">
|
||||||
{{? entry.navlink != "#"}}<a href="{{=entry.navlink}}">{{?}}
|
{{? entry.navlink != "#"}}<a href="{{=entry.navlink}}" {{=it.c.config.kindleHack}}>{{?}}
|
||||||
<h2>{{=htmlspecialchars (entry.title)}}</h2>
|
<h2>{{=htmlspecialchars (entry.title)}}</h2>
|
||||||
<h4>{{=entry.content}}</h4>
|
<h4>{{=entry.content}}</h4>
|
||||||
{{? entry.navlink != "#"}}</a>{{?}}
|
{{? entry.navlink != "#"}}</a>{{?}}
|
||||||
|
@ -20,17 +20,17 @@
|
||||||
<article class="books">
|
<article class="books">
|
||||||
<span class="cover">
|
<span class="cover">
|
||||||
{{? entry.book.hasCover == 1}}
|
{{? entry.book.hasCover == 1}}
|
||||||
<a class="fancycover" href="{{=str_format (it.c.url.coverUrl, entry.book.id, it.databaseId)}}">
|
<a class="fancycover" href="{{=str_format (it.c.url.coverUrl, entry.book.id, it.databaseId)}}" {{=it.c.config.kindleHack}}>
|
||||||
<img src="{{=str_format (it.c.url.thumbnailUrl, entry.book.id, it.databaseId)}}" alt="{{=it.c.i18n.coverAlt}}" />
|
<img src="{{=str_format (it.c.url.thumbnailUrl, entry.book.id, it.databaseId)}}" alt="{{=it.c.i18n.coverAlt}}" />
|
||||||
</a>
|
</a>
|
||||||
{{?}}
|
{{?}}
|
||||||
</span>
|
</span>
|
||||||
<h2 class="download">
|
<h2 class="download">
|
||||||
{{~entry.book.preferedData:data:j}}
|
{{~entry.book.preferedData:data:j}}
|
||||||
<a href="{{=data.url}}">{{=data.name}}</a><br />
|
<a href="{{=data.url}}" {{=it.c.config.kindleHack}}>{{=data.name}}</a><br />
|
||||||
{{~}}
|
{{~}}
|
||||||
</h2>
|
</h2>
|
||||||
<a class="fancydetail" href="{{=str_format (it.c.url.detailUrl, entry.book.id, it.databaseId)}}">
|
<a class="fancydetail" href="{{=str_format (it.c.url.detailUrl, entry.book.id, it.databaseId)}}" {{=it.c.config.kindleHack}}>
|
||||||
<div class="fullclickpopup">
|
<div class="fullclickpopup">
|
||||||
<h2><span class="st">{{=htmlspecialchars (entry.title)}}</span>
|
<h2><span class="st">{{=htmlspecialchars (entry.title)}}</span>
|
||||||
{{? entry.book.pubDate != ""}}<span class="sp">({{=entry.book.pubDate}})</span>{{?}}
|
{{? entry.book.pubDate != ""}}<span class="sp">({{=entry.book.pubDate}})</span>{{?}}
|
||||||
|
|
Loading…
Reference in a new issue