mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
Prepend page headings to resource spacebar reading
This commit is contained in:
@@ -1853,6 +1853,14 @@
|
||||
return (el.textContent || '').trim().length > 10;
|
||||
});
|
||||
var textBlocks = [];
|
||||
var titleEl = document.querySelector('h1');
|
||||
if (titleEl && (titleEl.textContent || '').trim().length > 0) {
|
||||
textBlocks.push(titleEl);
|
||||
}
|
||||
var subtitleEl = document.querySelector('.subtitle');
|
||||
if (subtitleEl && (subtitleEl.textContent || '').trim().length > 0) {
|
||||
textBlocks.push(subtitleEl);
|
||||
}
|
||||
// If a specific element is highlighted, read only that; otherwise read all concatenated
|
||||
if (highlighted) {
|
||||
textBlocks = [highlighted];
|
||||
|
||||
Reference in New Issue
Block a user