Skip to content

Instantly share code, notes, and snippets.

@jonlow
Last active August 29, 2015 14:06
Show Gist options
  • Save jonlow/dbf0310080947604a271 to your computer and use it in GitHub Desktop.
Save jonlow/dbf0310080947604a271 to your computer and use it in GitHub Desktop.
Output links for all pages in a Lectora module
var i = 0,
pages = contentframe.document.querySelectorAll('#foldertree a')
for (; i < pages.length; i++) {
if(!pages[i].querySelector('img')) {
console.log(pages[i]);
// Now that we have the links we can use the
// trivExitPage('page12345.html') function
// to handpick pages to navigate to
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment