Commit Graph

19 Commits

Author SHA1 Message Date
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Florian Bruhin
4407ef032a Clean up JS 2016-10-03 07:01:22 +02:00
Florian Bruhin
323d5fc9e7 Also fix scroll.to_perc with position:absolute 2016-10-03 06:59:35 +02:00
Florian Bruhin
fc0b62f122 Revert "scroll.js --> fix scroll measures"
This reverts commit 0c5d95c943.

Using those values is probably okay as long as we adjust for the
off-by-one errors which will follow in the next commit.
2016-10-03 06:51:57 +02:00
Spreadyy
0c5d95c943 scroll.js --> fix scroll measures
scroll measures failed a travis test where document.documentElement.offsetHeight and document.documentElement.scrollHeight diffed by one pixel when the browser zoomed. --> Removed offsetHeight.
2016-09-29 08:59:46 +02:00
Spreadyy
f2e471597d Lint test failed --> edited line length 2016-09-27 23:24:12 +02:00
Spreadyy
a22ae2818c 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
2016-09-27 11:41:47 +02:00
Florian Bruhin
b45f940e72 Move some scroll logic from JS to Python 2016-09-09 14:19:21 +02:00
Florian Bruhin
919196714b QtWebEngine: Implement WebEngineScroller.at_bottom 2016-09-07 09:32:51 +02:00
Florian Bruhin
a23f3a24b3 scroll.js: Use window.inner{Width,Height}
It seems with document.documentElement.client{Height,Width} we
sometimes (e.g. without <!DOCTYPE html)...) get the full element height
instead of the viewport height.

Fixes #1821.
2016-08-11 11:57:20 +02:00
Florian Bruhin
e7584b9e1e scroll.js: Add commented debug output 2016-08-10 21:44:16 +02:00
Florian Bruhin
6b7a39685e Modularize javascript code
We now load the JS code as a QWebEngineScript, which sets up
window._qutebrowser with various "modules". That means we don't have to
pass the whole module every time we want to execute something.
2016-08-09 13:17:44 +02:00
Florian Bruhin
4da53480c2 Re-enable and reconfigure eslint 2016-08-09 11:00:26 +02:00
Florian Bruhin
80016006c4 Use and enforce "use strict"; for JS 2016-08-09 09:55:14 +02:00
Florian Bruhin
0169f3a24f Add _qutebrowser_ prefix for custom JS functions
With QtWebKit or QtWebEngine with Qt < 5.7, the functions end up in the
page's namespace. We can't easily avoid this, but at least we can name
them in a way which reduces conflicts.
2016-08-05 10:31:07 +02:00
Florian Bruhin
695864281b QtWebEngine: Implement pixel scroll position in JS 2016-07-15 13:04:44 +02:00
Florian Bruhin
7adc8ab2d6 QtWebEngine: Implement scroll position based on JS 2016-07-15 12:52:27 +02:00
Florian Bruhin
c83a8a64dc QtWebEngine: Implement scroll.delta_page 2016-07-13 11:26:53 +02:00
Florian Bruhin
b78b89f04f QtWebEngine: Implement :scroll-perc via JS 2016-07-13 10:55:04 +02:00