aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/baggy/view.twig19
1 files changed, 19 insertions, 0 deletions
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig
index c925e91c..092be04e 100644
--- a/themes/baggy/view.twig
+++ b/themes/baggy/view.twig
@@ -29,4 +29,23 @@
29 {{ content | raw }} 29 {{ content | raw }}
30 </article> 30 </article>
31 </div> 31 </div>
32 <script src="{{ poche_url }}/themes/{{theme}}/js/restoreScroll.js"></script>
33 <script type="text/javascript">
34 $(document).ready(function() {
35
36 $(window).scroll(function(e){
37 var scrollTop = $(window).scrollTop();
38 var docHeight = $(document).height();
39 var scrollPercent = (scrollTop) / (docHeight);
40 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
41 savePercent({{ entry.id|e }}, scrollPercentRounded);
42 });
43
44 retrievePercent({{ entry.id|e }});
45
46 $(window).resize(function(){
47 retrievePercent({{ entry.id|e }});
48 });
49 });
50 </script>
32{% endblock %} 51{% endblock %}