Skip to content

Instantly share code, notes, and snippets.

@ashander
Last active September 25, 2017 21:12
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 ashander/c4f59ef39aedf9d42dead451170ef429 to your computer and use it in GitHub Desktop.
Save ashander/c4f59ef39aedf9d42dead451170ef429 to your computer and use it in GitHub Desktop.
Google scholar advanced bookmarklet
<!-- copy and paste all lines starting with javascript: below into a new bookmark. you will need to click it twice to
get to GS advanced.
Uses logic from from https://stackoverflow.com/questions/2267718/loading-page-and-executing-js-on-it-from-js-bookmarklet -->
javascript:
var url = this.document.location.href;
if(!url.includes("https://scholar.google.com/")) {
this.document.location.href = "https://scholar.google.com/";
} else {
if (document.readyState === "complete") {
var hp = document.getElementById('gs_hp_drw_adv');
var res = document.getElementById('gs_res_drw_adv');
if (hp === null) {
res.click();
} else {
hp.click();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment