Skip to content

Instantly share code, notes, and snippets.

@kuzeko
Created October 22, 2014 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuzeko/fba1d6a63ff23aa5f8cb to your computer and use it in GitHub Desktop.
Save kuzeko/fba1d6a63ff23aa5f8cb to your computer and use it in GitHub Desktop.
var titles = [];
$('#bodyContent a[title], .toctext')
.not('[title*=":"]')
.each(function(){
if($(this).text().length > 2) {
titles.push($(this).text())
}
});
var rexp = new RegExp("\\\"(.+)\\\"", "g");
$('.external.text')
.each(function(){
var title = $(this).text().replace(rexp,"$1");
if(title.length > 2) {
titles.push(title)
}
});
titles.sort();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment