Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Find in Maps bookmarklet
Find in Maps Bookmarklet
author: @sansumbrella
Enters the selected query into Google Maps.
Maps is generally location-aware, so it should pick out your city for use
(function() {
var p;
function init(){
var selected;
var mapsUrl = '';
if (window.getSelection) {
selected = window.getSelection();
} else if (document.selection) {
selected = document.selection.createRange();
var address = "";
if(selected.toString()!="") {
address = selected.toString();
} else {
address = escape( prompt('Enter Street Address:','') );
document.location.href= mapsUrl + address;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.