Skip to content

Instantly share code, notes, and snippets.

@enjalot
Last active November 27, 2023 00:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enjalot/c0e1634fb919c37575b8 to your computer and use it in GitHub Desktop.
Save enjalot/c0e1634fb919c37575b8 to your computer and use it in GitHub Desktop.
Bookmarklet
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
</head>
<style>
body {
font-size: 70px;
font-family: Roboto;
}
</style>
<body>
Drag this
<a href='javascript:(function()%7Bvar%20current%20%3D%20window.location%20%2B%20%22%22%3Bvar%20newUrl%20%3D%20current.replace(%22https%3A%2F%2Fbl.ocks.org%22%2C%20%22http%3A%2F%2Fblockbuilder.org%22)%3BnewUrl%20%3D%20newUrl.replace(%22http%3A%2F%2Fbl.ocks.org%22%2C%20%22http%3A%2F%2Fblockbuilder.org%22)%3BnewUrl%20%3D%20newUrl.replace(%22https%3A%2F%2Fgist.github.com%22%2C%20%22http%3A%2F%2Fblockbuilder.org%22)%3Bwindow.location%3DnewUrl%7D)()' title="Block Builder">Block Builder</a> link to your bookmark bar to quickly navigate to <a href="http://blockbuilder.org" target="_blank" >blockbuilder.org</a> when viewing any gist or <a href="http://bl.ocks.org" target="_blank">bl.ocks.org</a> page
<script>
// what the bookmarklet does:
// I used http://mrcoles.com/bookmarklet/ to "compile" it
/*
var current = window.location + "";var newUrl = current.replace("https://bl.ocks.org", "http://blockbuilder.org");newUrl = newUrl.replace("http://bl.ocks.org", "http://blockbuilder.org");newUrl = newUrl.replace("https://gist.github.com", "http://blockbuilder.org");window.location=newUrl
*/
</script>
</body>
@zeffii
Copy link

zeffii commented Apr 9, 2016

@enjalot is there a link to this anywhere on the blockbuilder landing page? it's really handy ;)

@zeffii
Copy link

zeffii commented Apr 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment