' + articleObject.content + '
'
Array.from(newsArticleContentScrollable.getElementsByClassName('bbCodeSpoilerButton')).forEach(v => {
v.onclick = () => {
const text = v.parentElement.getElementsByClassName('bbCodeSpoilerText')[0]
text.style.display = text.style.display === 'block' ? 'none' : 'block'
}
})
newsNavigationStatus.innerHTML = index + ' of ' + newsArr.length
newsContent.setAttribute('article', index-1)
}
/**
* Load news information from the RSS feed specified in the
* distribution index.
*/
function loadNews(){
return new Promise((resolve, reject) => {
const distroData = DistroManager.getDistribution()
const newsFeed = distroData.getRSS()
const newsHost = new URL(newsFeed).origin + '/'
$.ajax({
url: newsFeed,
success: (data) => {
const items = $(data).find('item')
const articles = []
for(let i=0; i