Created
January 24, 2019 14:49
-
-
Save bobbzorzen/f93382004789b233d0c3958247153c97 to your computer and use it in GitHub Desktop.
JS bookmarklet for searching jlt for travel home
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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