Skip to content

Instantly share code, notes, and snippets.

@Antti
Created December 11, 2017 14:42
Show Gist options
  • Save Antti/d645bcaf09c3d1cb708ad59f933e499d to your computer and use it in GitHub Desktop.
Save Antti/d645bcaf09c3d1cb708ad59f933e499d to your computer and use it in GitHub Desktop.
zoopla postcode bookmark
javascript: (function() {
var postCode = $("meta[property='og:postal-code']").attr("content");
var url = "https://www.google.com/maps/dir/?api=1&origin=" + postCode + "&destination=EC4R3TE&travelmode=transit";
$('h2[itemprop="streetAddress"').append('<span style="color: red"> (' + "<a target='_blank' href='" + url + "'>" + postCode + "</a>) </span>");
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment