Last active
October 5, 2015 06:08
-
-
Save nodtem66/2761795 to your computer and use it in GitHub Desktop.
Javascript to get list of all articles in Exteen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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,'<').replace(/>/g,'>').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