Last active
February 27, 2018 10:18
-
-
Save ldjb/93ca9a7d38a2d9305b5f1c951dbaaa00 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Redirecting to Citymapper...</title> | |
<script> | |
(function () { | |
if (!location.href.match(/query=/)) { | |
document.write("<p>Sorry, I could not retrieve the Pokémon's details.</p>"); | |
} | |
else { | |
let endcoord = getQuery("query"); | |
let pokemon = getQuery("niceName"); | |
let iv = getQuery("ivPercent") === "25" ? "" : getQuery("ivPercent") + ", "; | |
let cp = getQuery("cp") === "" ? "" : "CP " + getQuery("cp") + ", "; | |
let endtime = getQuery("expiryTime"); | |
location = "https://citymapper.com/directions?endcoord=" + endcoord + "&endname=" + pokemon + " (" + iv + cp + endtime + ")"; | |
setTimeout(close, 1000); | |
} | |
function getQuery(param) { | |
return location.href.match(new RegExp(param+"=(.*?)(&|$)"))[1]; | |
} | |
})(); | |
</script> | |
</head> | |
</html> |
Author
ldjb
commented
Feb 26, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment