Improving better yet search.
This commit is contained in:
parent
8e415d8d36
commit
8462abba70
@ -126,8 +126,10 @@ function searchInWebsite(value, isToBottom) {
|
|||||||
const selection = window.getSelection()
|
const selection = window.getSelection()
|
||||||
const anchorNode = selection.anchorNode.parentNode
|
const anchorNode = selection.anchorNode.parentNode
|
||||||
if (anchorNode !== null) {
|
if (anchorNode !== null) {
|
||||||
anchorNode.scrollIntoView()
|
const left = anchorNode.offsetLeft
|
||||||
anchorNode.focus()
|
const topPosition = anchorNode.offsetTop
|
||||||
|
const pageContents = document.querySelector('div.page-contents');
|
||||||
|
pageContents.scroll(left, topPosition - 80)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,11 +321,11 @@ function addEasterEggAnimation() {
|
|||||||
let current_ad_number = null
|
let current_ad_number = null
|
||||||
|
|
||||||
function expand_page_contents() {
|
function expand_page_contents() {
|
||||||
const page_contents = document.querySelector('div.page-contents');
|
const pageContents = document.querySelector('div.page-contents');
|
||||||
if (page_contents === null) {
|
if (pageContents === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
page_contents.classList.add('no-carousel');
|
pageContents.classList.add('no-carousel');
|
||||||
}
|
}
|
||||||
|
|
||||||
function no_more_ads() {
|
function no_more_ads() {
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user