commento.js: use scrollIntoView for #commento
This commit is contained in:
parent
15b1640f89
commit
88d4f8afcf
@ -1610,7 +1610,8 @@
|
|||||||
|
|
||||||
|
|
||||||
function loadHash() {
|
function loadHash() {
|
||||||
if (window.location.hash && window.location.hash.startsWith("#commento-")) {
|
if (window.location.hash) {
|
||||||
|
if (window.location.hash.startsWith("#commento-")) {
|
||||||
var el = $(ID_CARD + window.location.hash.split("-")[1]);
|
var el = $(ID_CARD + window.location.hash.split("-")[1]);
|
||||||
if (el === null) {
|
if (el === null) {
|
||||||
return;
|
return;
|
||||||
@ -1618,6 +1619,9 @@
|
|||||||
|
|
||||||
classAdd(el, "highlighted-card");
|
classAdd(el, "highlighted-card");
|
||||||
el.scrollIntoView(true);
|
el.scrollIntoView(true);
|
||||||
|
} else if (window.location.hash.startsWith("#commento")) {
|
||||||
|
root.scrollIntoView(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user