Skip to content

Instantly share code, notes, and snippets.

@TG9541
Created November 20, 2022 19:28
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 TG9541/a4b6b48bbecf3ac672ee2e25a30e6fb2 to your computer and use it in GitHub Desktop.
Save TG9541/a4b6b48bbecf3ac672ee2e25a30e6fb2 to your computer and use it in GitHub Desktop.
A bookmarklet for Google Scholar
Looks up selected text, or else opens a dialog box
Create bookmark with the below text as the URL:
javascript:T='Scholar';S='https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&btnG=&q=';Q=document.getSelection().toString().replace(/[\.\%22,;%E2%80%9D%E2%80%9C\?]/g,%22%22);if(!Q){void(Q=prompt('Search%20'+T,'-'));if(Q){if(Q=='-'){location.href='http://scholar.google.com';}else{location.href=S+escape(Q);}}}else{void(window.open(S+escape(Q),T))}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment