Skip to content

Instantly share code, notes, and snippets.

@nodtem66
Last active October 5, 2015 06:08
Show Gist options
  • Save nodtem66/2761795 to your computer and use it in GitHub Desktop.
Save nodtem66/2761795 to your computer and use it in GitHub Desktop.
Javascript to get list of all articles in Exteen
var list = document.getElementById('entrylist') , data=[];
if(list.children[0] && list.children[0].children[0] && list.children[0].children[0].children[1])
list = list.children[0].children[0].children[1].children;
for(i=0, len=list.length; i<len; i++) {
var date = list[i].children[1].innerHTML.split('.').join('/')
,title = list[i].children[2].innerHTML
,directory = list[i].children[3].innerHTML
,category = list[i].children[4].innerHTML
,comment = list[i].children[5].innerHTML
;
data[i] = {'date':date, 'title':title, 'dir':directory,'cat': category,'comment': comment};
}
document.write(JSON.stringify(data).replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/{/g,'<br>{'));
document.body.setAttribute('style','width:10000px');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment