function update() {
const data = new URLSearchParams();
+ const params = new URLSearchParams(location.search);
if (location.pathname === "/history") {
data.set("bbox", map.getBounds().wrap().toBBoxString());
data.set("list", "1");
+ if (params.has("before")) {
+ data.set("before", params.get("before"));
+ }
+
fetch(location.pathname + "?" + data)
.then(response => response.text())
.then(function (html) {