Skip to content

Instantly share code, notes, and snippets.

@jpigla
Created April 19, 2022 22:03
Show Gist options
  • Save jpigla/827151bb4afbd29d93defe941a36ce75 to your computer and use it in GitHub Desktop.
Save jpigla/827151bb4afbd29d93defe941a36ce75 to your computer and use it in GitHub Desktop.
Bookmarklet: PAAs from Google
javascript:(function(){
divClasses = document.getElementsByTagName("div");
output = "<html><head><title>PPAs for \"" + document.title.split(" - ")[0] + "\"</title><style type='text/css'>body{font-family:Tahoma,Verdana,Segoe,sans-serif;font-size:18px;color:#2c3e50;margin:30px}h1{color:#34495e;font-size:20px;margin-bottom:5px}</style></head>";
output += "<body><h1>PPAs for \"" + document.title.split(" - ")[0] + "\"</h1><ol>";
for (i = 0; i < divClasses.length; i++) {
if (divClasses[i].getAttribute("class") == "iDjcJe IX9Lgd wwB5gf") {
output += "<li>" + divClasses[i].childNodes[0].innerHTML + "</li>"
}
}
output += "</ol></body></html>";
with (window.open()) {
document.write(output);
document.close();
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment