Skip to content

Instantly share code, notes, and snippets.

@Deleetdk
Created November 2, 2016 23:18
Show Gist options
  • Save Deleetdk/e445ad9212217192ef82a4d0c2d7824b to your computer and use it in GitHub Desktop.
Save Deleetdk/e445ad9212217192ef82a4d0c2d7824b to your computer and use it in GitHub Desktop.
Google Scholar bookmarklet
/*
Function
This bookmarklet helps you quickly search Google Scholar for a given string with added keywords.
By default these keywords are words related to mortality of diseases: prognosis, life expectancy, natural history and mortality.
You can change them below.
How to use
Make a new bookmark. In the location, place the javascript code below.
*/
javascript:(function(){
/*site html */
var disease = window.prompt("Insert disease name");
/* replace spaces */
disease.replace(" ", "+");
/*make url*/
var url = "https://scholar.google.com/scholar?hl=en&q=" + disease + " prognosis+life+expectancy+natural+history+mortality";
console.log(url);
/*go to first hit*/
window.location = url;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment