Skip to content

Instantly share code, notes, and snippets.

@mayukojpn
Created November 5, 2014 07:01
Show Gist options
  • Save mayukojpn/66b11f3228f41282e065 to your computer and use it in GitHub Desktop.
Save mayukojpn/66b11f3228f41282e065 to your computer and use it in GitHub Desktop.
WordPressの管理画面で記事タイトルとリンクを抜き出す
var title=document.getElementsByClassName("post-title"),titleList;
for(var i=0;title.length>i;i++){
titleList+=title[i].getElementsByTagName('a')[0].innerText;
titleList+=title[i].getElementsByClassName("view")[0].childNodes[0].getAttribute("href");
}
console.log(titleList);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment