Skip to content

Instantly share code, notes, and snippets.

@bobbzorzen
Created January 24, 2019 14:49
Show Gist options
  • Save bobbzorzen/f93382004789b233d0c3958247153c97 to your computer and use it in GitHub Desktop.
Save bobbzorzen/f93382004789b233d0c3958247153c97 to your computer and use it in GitHub Desktop.
JS bookmarklet for searching jlt for travel home
javascript:(function() {
let d = new Date();
let ch = d.getHours();
let cm = d.getMinutes();
let cY = d.getFullYear();
let cM = d.getMonth();
let cD = d.getDate();
let cd = cY+"-"+cM+"-"+cD;
let from = "Jönköping%20Stadsbiblioteket";
let to = "Huskvarna%20Esplanaden";
let url = "http://jlt.se/?from=" + from + "&to=" + to + "&travelDirection=0&time=" + ch + "%3A" + cm +"&date=" + cd + "&via=&changeTime=0&priorityTravelAfter=0&meansOfTransport=15&canWalk=false";
window.open(url, "_blank");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment