aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/view.twig
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/view.twig')
-rw-r--r--tpl/view.twig19
1 files changed, 19 insertions, 0 deletions
diff --git a/tpl/view.twig b/tpl/view.twig
index 2b6d91d5..f9405f45 100644
--- a/tpl/view.twig
+++ b/tpl/view.twig
@@ -37,4 +37,23 @@
37 <p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&amp;body={{ entry.url|url_encode }}">{% trans "contact us by mail" %}</a></p> 37 <p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&amp;body={{ entry.url|url_encode }}">{% trans "contact us by mail" %}</a></p>
38 </div> 38 </div>
39 </div> 39 </div>
40 <script src="./tpl/js/restoreScroll.js"></script>
41 <script type="text/javascript">
42 $(document).ready(function() {
43
44 $(window).scroll(function(e){
45 var scrollTop = $(window).scrollTop();
46 var docHeight = $(document).height();
47 var scrollPercent = (scrollTop) / (docHeight);
48 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
49 savePercent({{ entry.id|e }}, scrollPercentRounded);
50 });
51
52 retrievePercent({{ entry.id|e }});
53
54 $(window).resize(function(){
55 retrievePercent({{ entry.id|e }});
56 });
57 });
58 </script>
40{% endblock %} \ No newline at end of file 59{% endblock %} \ No newline at end of file