Skip to content

Commit

Permalink
Bookmarklet
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Aug 13, 2013
1 parent 4376dff commit 2d568f1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
5 changes: 3 additions & 2 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ <h1 id='extension'>Chrome Extension</h1>
<p>
<a href='https://github.com/mapbox/geojsonio-extension/releases/download/v0.2.0/geojsonio-chrome.crx'>Download the latest release of the geojson.io extension</a>
to add a 'geojson.io' button to applicable Gists and files on <a href='http://github.com/'>GitHub</a>.
It's <a href='https://github.com/mapbox/geojsonio-extension'>open source on GitHub</a> if you want to
port it to your favorite browser.
</p>
<h1 id='bookmarklet'>Bookmarklet</h1>
<p>Don't use Chrome? Gotcha covered.</p>
<iframe src='bookmarklet.html' width='100%' height=50 frameborder='no'></iframe>
<h1 id='source'>Open Source</h1>
<p>This site is an <a href='http://github.com/mapbox/geojson.io'>open source project</a>.</p>
<h1 id='restrictions'>License &amp; Restrictions</h1>
Expand Down
22 changes: 22 additions & 0 deletions bookmarklet.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>geojson.io</title>
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
<style>
a {
border-radius:5px;
background:#eee;
padding:5px;
}
body {
color:#222;
font:normal 12px/20px sans-serif;
}
</style>
</head>
<body>
<a href='javascript:var SITE="http://geojson.io";"github.com"==location.hostname&&window.location.href.match(/\.(geo)?json$/)?window.open(SITE+"/#github:"+location.pathname):"gist.github.com"==location.hostname?window.open(SITE+"/#gist:"+location.pathname):alert("Sorry, looks like you aren't on GitHub or aren't looking at a GeoJSON file");'>edit on geojson.io</a> &larr; drag this link to you address bar, and click it to edit a GitHub file in geojson.io
</body>
</html>

0 comments on commit 2d568f1

Please sign in to comment.