Skip to content

Instantly share code, notes, and snippets.

@iamandrewluca
Last active September 8, 2021 07:33
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 iamandrewluca/4184e0700e7c50a81e9c15daa63684cf to your computer and use it in GitHub Desktop.
Save iamandrewluca/4184e0700e7c50a81e9c15daa63684cf to your computer and use it in GitHub Desktop.
Extended njt.vercel.app but with GitHub as default, and TypeScript Search #bookmarklet
javascript: void ((function(query) {
/* More bookmarklets at https://gist.github.com/iamandrewluca/61feacf07bc4f2f50e70f986c2e9b2d2 */
const [packageName, destination = 'g'] = decodeURIComponent(query).split('+').join(' ').split(' ');
if (destination === 'ts') {
window.location.href = `https://www.typescriptlang.org/dt/search?search=${packageName}`;
} else {
window.location.href = `https://njt.vercel.app/jump?to=${packageName} ${destination}`;
}
})('%s'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment