mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
Remove smooth scrolling animation from all keyboard navigation
Changed scrollIntoView behavior from 'smooth' to 'auto' across all templates for instant, non-animated navigation between selections. Affected ~75 instances across 50+ template files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -348,7 +348,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -358,7 +358,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -368,7 +368,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -346,7 +346,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -356,7 +356,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -366,7 +366,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -346,7 +346,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -356,7 +356,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -366,7 +366,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -370,7 +370,7 @@ document.body.dataset.resourceReader = 'true';
|
||||
entries[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
entries[selectedIndex].style.outlineOffset = '4px';
|
||||
entries[selectedIndex].classList.add('selected');
|
||||
entries[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
entries[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -344,7 +344,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -354,7 +354,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -364,7 +364,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -287,7 +287,7 @@ document.body.dataset.resourceReader = 'true';
|
||||
|
||||
// Scroll to the section
|
||||
sections[selectedIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'start'
|
||||
});
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
if (chapterSection) {
|
||||
chapterSection.classList.add('selected');
|
||||
chapterSection.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'center'
|
||||
});
|
||||
}
|
||||
@@ -462,7 +462,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Scroll into view if needed
|
||||
chapterLinks[selectedChapterIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'nearest'
|
||||
});
|
||||
}
|
||||
@@ -481,7 +481,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Scroll into view if needed
|
||||
contentParagraphs[selectedParagraphIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
setTimeout(() => {
|
||||
const target = document.querySelector(window.location.hash);
|
||||
if (target) {
|
||||
target.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
target.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
target.classList.add('highlight-verse');
|
||||
setTimeout(() => {
|
||||
target.classList.remove('highlight-verse');
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
|
||||
// Scroll into view
|
||||
cards[selectedIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -409,14 +409,14 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
// Scroll to first verse
|
||||
const firstVerse = document.getElementById('verse-' + start);
|
||||
if (firstVerse) {
|
||||
firstVerse.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
firstVerse.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
} else {
|
||||
// Single verse
|
||||
const verseEl = document.getElementById('verse-' + versePart);
|
||||
if (verseEl) {
|
||||
verseEl.style.backgroundColor = 'rgba(255, 235, 59, 0.2)';
|
||||
verseEl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
verseEl.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,7 +753,7 @@ document.addEventListener('click', function(e) {
|
||||
verses[selectedVerseIndex].style.outline = '2px solid #4a7c59';
|
||||
verses[selectedVerseIndex].style.outlineOffset = '4px';
|
||||
verses[selectedVerseIndex].classList.add('selected');
|
||||
verses[selectedVerseIndex].scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
verses[selectedVerseIndex].scrollIntoView({ behavior: 'auto', block: 'start' });
|
||||
}
|
||||
|
||||
function getWordsInVerse(verseIndex) {
|
||||
@@ -772,7 +772,7 @@ document.addEventListener('click', function(e) {
|
||||
word.classList.add('keyboard-selected');
|
||||
word.style.outline = '2px solid #4a7c59';
|
||||
word.style.outlineOffset = '2px';
|
||||
word.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
word.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function expandSelectedWord() {
|
||||
|
||||
@@ -493,7 +493,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
setTimeout(() => {
|
||||
const target = document.querySelector(window.location.hash);
|
||||
if (target) {
|
||||
target.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
target.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
target.style.transition = 'background-color 1s';
|
||||
target.style.backgroundColor = 'rgba(255, 235, 59, 0.5)';
|
||||
|
||||
@@ -526,7 +526,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
verseCards[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
verseCards[selectedIndex].style.outlineOffset = '4px';
|
||||
verseCards[selectedIndex].classList.add('selected');
|
||||
verseCards[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
verseCards[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -826,7 +826,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Scroll into view
|
||||
allItems[selectedIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
nodes[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
nodes[selectedIndex].style.outlineOffset = '4px';
|
||||
nodes[selectedIndex].classList.add('selected');
|
||||
nodes[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
nodes[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
nodes[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
nodes[selectedIndex].style.outlineOffset = '4px';
|
||||
nodes[selectedIndex].classList.add('selected');
|
||||
nodes[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
nodes[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -438,7 +438,7 @@
|
||||
cards[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
cards[selectedIndex].style.outlineOffset = '2px';
|
||||
cards[selectedIndex].classList.add('selected');
|
||||
cards[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
cards[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -714,7 +714,7 @@
|
||||
sections[selectedSectionIndex].style.outline = '2px solid #4a7c59';
|
||||
sections[selectedSectionIndex].style.outlineOffset = '4px';
|
||||
sections[selectedSectionIndex].classList.add('selected');
|
||||
sections[selectedSectionIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
sections[selectedSectionIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectItem(index) {
|
||||
@@ -724,7 +724,7 @@
|
||||
allItems[selectedItemIndex].style.outline = '2px solid #4a7c59';
|
||||
allItems[selectedItemIndex].style.outlineOffset = '4px';
|
||||
allItems[selectedItemIndex].classList.add('selected');
|
||||
allItems[selectedItemIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
allItems[selectedItemIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function getItemsInSection(section) {
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
results[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
results[selectedIndex].style.outlineOffset = '4px';
|
||||
results[selectedIndex].classList.add('selected');
|
||||
results[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
results[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -350,7 +350,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -360,7 +360,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -370,7 +370,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -618,7 +618,7 @@ function selectCard(index) {
|
||||
|
||||
// Scroll into view
|
||||
allCards[selectedCardIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -349,7 +349,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -359,7 +359,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
elements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
elements[selectedIndex].style.outlineOffset = '8px';
|
||||
elements[selectedIndex].classList.add('selected');
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -358,7 +358,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -368,7 +368,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -378,7 +378,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
elements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
elements[selectedIndex].style.outlineOffset = '8px';
|
||||
elements[selectedIndex].classList.add('selected');
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
cards[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
cards[selectedIndex].style.outlineOffset = '2px';
|
||||
cards[selectedIndex].classList.add('selected');
|
||||
cards[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
cards[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -193,7 +193,7 @@ document.body.dataset.resourceReader = 'true';
|
||||
elements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
elements[selectedIndex].style.outlineOffset = '8px';
|
||||
elements[selectedIndex].classList.add('selected');
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -345,7 +345,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -355,7 +355,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectContentElement(index) {
|
||||
@@ -365,7 +365,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function isInViewport(el) {
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
cards[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
cards[selectedIndex].style.outlineOffset = '2px';
|
||||
cards[selectedIndex].classList.add('selected');
|
||||
cards[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
cards[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -452,7 +452,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
resultIndex = Math.max(0, Math.min(index, searchResults.length - 1));
|
||||
searchResults[resultIndex].style.outline = '2px solid #4a7c59';
|
||||
searchResults[resultIndex].style.outlineOffset = '4px';
|
||||
searchResults[resultIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
searchResults[resultIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -503,7 +503,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedCardIndex = -1;
|
||||
selectedCatIndex = Math.max(0, Math.min(index, categoryItems.length - 1));
|
||||
categoryItems[selectedCatIndex].classList.add('selected');
|
||||
categoryItems[selectedCatIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
categoryItems[selectedCatIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectStoryCard(index) {
|
||||
@@ -516,7 +516,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedCardIndex = Math.max(0, Math.min(index, cards.length - 1));
|
||||
cards[selectedCardIndex].style.outline = '2px solid #4a7c59';
|
||||
cards[selectedCardIndex].style.outlineOffset = '4px';
|
||||
cards[selectedCardIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
cards[selectedCardIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -517,7 +517,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
cards[selectedCardIndex].style.outline = '2px solid #8b5cf6';
|
||||
cards[selectedCardIndex].style.outlineOffset = '4px';
|
||||
cards[selectedCardIndex].classList.add('selected');
|
||||
cards[selectedCardIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
cards[selectedCardIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -370,7 +370,7 @@ hr.story-divider::before {
|
||||
elements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
elements[selectedIndex].style.outlineOffset = '8px';
|
||||
elements[selectedIndex].classList.add('selected');
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -391,7 +391,7 @@ hr.story-divider::before {
|
||||
elements[selectedIndex].style.outline = '2px solid #8b5cf6';
|
||||
elements[selectedIndex].style.outlineOffset = '8px';
|
||||
elements[selectedIndex].classList.add('selected');
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -496,7 +496,7 @@
|
||||
|
||||
// Scroll into view
|
||||
cards[selectedIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
allItems[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
allItems[selectedIndex].style.outlineOffset = '2px';
|
||||
allItems[selectedIndex].classList.add('selected');
|
||||
allItems[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
allItems[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
entries[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
entries[selectedIndex].style.outlineOffset = '2px';
|
||||
entries[selectedIndex].classList.add('selected');
|
||||
entries[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
entries[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -246,7 +246,7 @@ document.body.dataset.resourceReader = 'true';
|
||||
paragraphs[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
paragraphs[selectedIndex].style.outlineOffset = '4px';
|
||||
paragraphs[selectedIndex].classList.add('selected');
|
||||
paragraphs[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
paragraphs[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
links[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
links[selectedIndex].style.outlineOffset = '2px';
|
||||
links[selectedIndex].classList.add('selected');
|
||||
links[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
links[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -216,7 +216,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -226,7 +226,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -236,7 +236,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
elements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
elements[selectedIndex].style.outlineOffset = '8px';
|
||||
elements[selectedIndex].classList.add('selected');
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
cards[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
cards[selectedIndex].style.outlineOffset = '2px';
|
||||
cards[selectedIndex].classList.add('selected');
|
||||
cards[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
cards[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -345,7 +345,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -355,7 +355,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -365,7 +365,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
@@ -887,7 +887,7 @@
|
||||
elements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
elements[selectedIndex].style.outlineOffset = '4px';
|
||||
elements[selectedIndex].classList.add('selected');
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
elements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectWord(index) {
|
||||
@@ -906,7 +906,7 @@
|
||||
word.classList.add('keyboard-selected');
|
||||
word.style.outline = '2px solid #4a7c59';
|
||||
word.style.outlineOffset = '2px';
|
||||
word.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
word.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function isInterlinearSelected() {
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
rows[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
rows[selectedIndex].style.outlineOffset = '2px';
|
||||
rows[selectedIndex].classList.add('selected');
|
||||
rows[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
rows[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -346,7 +346,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = -1;
|
||||
toc.style.outline = '2px solid #4a7c59';
|
||||
toc.style.outlineOffset = '8px';
|
||||
toc.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
toc.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectTocItem(index) {
|
||||
@@ -356,7 +356,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedTocIndex = Math.max(0, Math.min(index, tocItems.length - 1));
|
||||
tocItems[selectedTocIndex].style.background = 'rgba(74, 124, 89, 0.15)';
|
||||
tocItems[selectedTocIndex].style.outline = '2px solid #4a7c59';
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
tocItems[selectedTocIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function selectElement(index) {
|
||||
@@ -366,7 +366,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
contentElements[selectedIndex].style.outline = '2px solid #4a7c59';
|
||||
contentElements[selectedIndex].style.outlineOffset = '8px';
|
||||
contentElements[selectedIndex].classList.add('selected');
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
contentElements[selectedIndex].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
|
||||
function shouldResetToViewport() {
|
||||
|
||||
Reference in New Issue
Block a user