Fix scroll JS for xkcd.

Fix wrong scroll.height for xkcd. Solution according to:
http://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javascript
This commit is contained in:
Spreadyy 2016-09-27 11:41:47 +02:00 committed by GitHub
parent 05dddf4f13
commit a22ae2818c

View File

@ -61,12 +61,13 @@ window._qutebrowser.scroll = (function() {
funcs.pos = function() {
var elem = document.documentElement;
var body = document.body;
var pos = {
"px": {"x": window.scrollX, "y": window.scrollY},
"scroll": {
"width": elem.scrollWidth,
"height": elem.scrollHeight,
"width": Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth),
"height": Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight),
},
"inner": {
"width": window.innerWidth,