Last active
December 27, 2015 09:59
-
-
Save ashnur/7307452 to your computer and use it in GitHub Desktop.
Open npm package url in a new tab from its github page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ var w=window.open(''); var r=document.createElement('script'); r.textContent = 'var x=new XMLHttpRequest;x.onload = function(){window.location.href=\'https://npmjs.org/package/\'+JSON.parse(atob(JSON.parse(x.responseText).content.replace(/\\n/g,\'\'))).name}; x.open(\'GET\',(\'https://api.github.com/repos'+window.location.pathname+'/contents/package.json\').replace(/([^:])[\/][\/]+/g,\'$1/\'));x.send()'; w.document.body.appendChild(r) }()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment