projects
/
hnim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Leave click scrolling up to the browser
[hnim.git]
/
hnim.js
diff --git
a/hnim.js
b/hnim.js
index
aab3bc0
..
1e804b3
100644
(file)
--- a/
hnim.js
+++ b/
hnim.js
@@
-15,7
+15,7
@@
const visible = (element) => {
let bounds = element.getBoundingClientRect();
const visible = (element) => {
let bounds = element.getBoundingClientRect();
- return Math.abs(bounds.bottom - bounds.top) > window.innerHeight ||
bounds.top >= 0 && bounds.bottom <= window.innerHeight
;
+ return Math.abs(bounds.bottom - bounds.top) > window.innerHeight ||
(bounds.top >= 0 && bounds.bottom <= window.innerHeight)
;
}
const changeWithVisibleCallback = (comment, callback) => {
}
const changeWithVisibleCallback = (comment, callback) => {
@@
-32,7
+32,7
@@
const change = (comment) => {
elementsIndex = elements.indexOf(comment);
const change = (comment) => {
elementsIndex = elements.indexOf(comment);
- changeWithVisibleCallback(comment, () => {});
+ changeWithVisibleCallback(comment, () => {
comment.scrollIntoView()
});
}
// Curry callback for moving downpage
}
// Curry callback for moving downpage