Skip to content

Instantly share code, notes, and snippets.

@udif
Last active December 8, 2016 15:48
Show Gist options
  • Save udif/a4a571e9f7c6b4818c0c1ba2dcbd5e87 to your computer and use it in GitHub Desktop.
Save udif/a4a571e9f7c6b4818c0c1ba2dcbd5e87 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name List Safari Books ISBNs
// @namespace
// @include http://*.safaribooksonline.com/mysafari
// @version 1.0
// @grant none
// ==/UserScript==
var l = document.querySelectorAll("#FolderItems > div > ul > li");
var i;
var t;
for (i = 1; i <= l.length; i++) {
t += document.querySelector("#FolderItems > div > ul > li:nth-child("+i+") > div.text > h4 > a").title+": ";
t += document.querySelector("#FolderItems > div > ul > li:nth-child("+i+")").getAttribute("data-folder-item-fpid")+"<br>";
}
document.querySelector("#folder_description > p:nth-child(5)").innerHTML=t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment