The Spokesman-Review Publications The Spokesman-Review Newspaper

Recent news Subscribe

Special sections

\n'); var alt = this.querySelector('img').alt || this.querySelector('img').getAttribute('data-alt'); location.hash = alt.replace(/-/g,'--').replace(/ /g,'-'); entitle(alt); } pubs[i].onclick = function () { return false; } } } function more() { var pubul = document.querySelector('.pubs'); var com = pubul.childNodes[pubul.childNodes.length-1]; var text = new DOMParser().parseFromString(com.textContent,'text/html'); com.parentNode.removeChild(com); if (text.querySelectorAll('li').length >= 16) { pubul.insertAdjacentHTML('beforeend',Object.entries(text.querySelectorAll('li')).slice(0,16).map(entry => entry[1].outerHTML).join('\n')+'\n'); } else { pubul.insertAdjacentHTML('beforeend',Object.entries(text.querySelectorAll('li')).slice(0,text.querySelectorAll('li').length-1).map(entry => entry[1].outerHTML).join('\n')); document.querySelector('[onmouseup="more();"]').parentNode.parentNode.removeChild(document.querySelector('[onmouseup="more();"]').parentNode); } var boxes = document.querySelectorAll('.pubs li a'); for (var i = 0; i < boxes.length; i++) { if (!boxes[i].querySelector('svg')) { boxes[i].innerHTML += ''+ ''+ ' <\/image>'+ '<\/svg>'; boxes[i].querySelector('img').style.backgroundImage = 'url('+boxes[i].getElementsByTagName('img')[0].src+')'; } } actions(); } window.addEventListener('DOMContentLoaded',function () { console.log('domcontentloaded'); document.querySelector('.site-body').style.background = 'none'; document.querySelector('.pubs').style.display = 'flex'; var pubs = document.querySelectorAll('.pubs a'); var pubul = document.querySelector('.pubs'); for (var i = 0; i < pubs.length; i++) { var pubsimg = pubs[i].querySelector('img'); pubsimg.setAttribute('title',pubsimg.getAttribute('alt')); pubsimg.setAttribute('data-alt',pubsimg.getAttribute('alt')); pubsimg.removeAttribute('alt'); } pubul.innerHTML = Object.entries(pubul.querySelectorAll('.pubs li')).slice(0,16).map(entry => entry[1].outerHTML).join('\n')+'\n'; if (pubul.childNodes[pubul.childNodes.length-1].nodeType == 8) { pubul.insertAdjacentHTML('afterend','

View more

'); } var boxes = document.querySelectorAll('.pubs li a'); document.querySelector('.pubs').insertAdjacentHTML('beforebegin',''+ '
\n'+ ' \n'+ ' \n'+ ' \n'+ ' \n'+ ' \n'+ '
\n'); for (var i = 0; i < boxes.length; i++) { if (!boxes[i].querySelector('svg')) { boxes[i].innerHTML += ''+ ''+ ' <\/image>'+ '<\/svg>'; boxes[i].querySelector('img').style.backgroundImage = 'url('+boxes[i].getElementsByTagName('img')[0].src+')'; } } if (location.hash) { var pubul = document.querySelector('.pubs'); var com = pubul.childNodes[pubul.childNodes.length-1]; var text = new DOMParser().parseFromString(com.textContent,'text/html'); var hashval = decodeURIComponent(location.hash.split('#')[1]).replace(/--/g,' ').replace(/-/g,' ').replace(/ /g,'-'); entitle(hashval); var hash = document.querySelector('img[data-alt^="'+hashval+'"]'); if (hash) { hash = document.querySelector('img[data-alt^="'+hashval+'"]').parentNode.href; } if (!hash) { hash = Object.entries(text.querySelectorAll('li[data-title^="'+hashval+'"] > a')).slice(0,2).map(entry => entry[1].outerHTML).join('\n').match(/href="[^"]+"/).toString().split('"')[1]; } document.querySelector('.pubs').insertAdjacentHTML('afterend',''+ '
\n'+ ' \n'+ ' X\n'+ '
\n'); } actions(); }); window.addEventListener('load',function () { console.log('load'); var pubimgs = document.querySelectorAll('.pubs a img'); for (var i = 0; i < pubimgs.length; i++) { pubimgs[i].setAttribute('alt',pubimgs[i].getAttribute('data-alt')); pubimgs[i].removeAttribute('data-alt'); } actions(); });