Skip to content

Instantly share code, notes, and snippets.

javascript: (function() {
var url = 'http://journeyplanner.tfl.gov.uk/user/XSLT_TRIP_REQUEST2';
var default_location = "MY_DEFAULT_LOCATION";
var input = '%s';
var matches = input.match(/(^\s*(.*)\s*>\s*(.*)\s*$|^\s*(.*)\s*<\s*(.*)\s*$)/);
if( ! matches) {
window.location = url;