|
|
|
@ -73,6 +73,9 @@
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
}
|
|
|
|
|
.copyonclick {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.clicktext {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
@ -165,6 +168,21 @@
|
|
|
|
|
];
|
|
|
|
|
var bgimg = bgs[Math.floor(Math.random() * bgs.length)];
|
|
|
|
|
$("body").css("background-image", "url(./img/bg/" + bgimg + ")");
|
|
|
|
|
|
|
|
|
|
$("body").on("click", ".copyonclick", function () {
|
|
|
|
|
var copyitem = $(this);
|
|
|
|
|
var copytext = copyitem.text();
|
|
|
|
|
if (copytext == "Copied to clipboard!") {
|
|
|
|
|
// prevent copying copied text if double-clicked
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
navigator.clipboard.writeText(copytext).then(() => {
|
|
|
|
|
copyitem.text("Copied to clipboard!");
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
copyitem.text(copytext);
|
|
|
|
|
}, 1000);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function dolookup(words) {
|
|
|
|
@ -173,11 +191,11 @@
|
|
|
|
|
var coords = FixPhrase.decode(words);
|
|
|
|
|
|
|
|
|
|
location.hash = "#map";
|
|
|
|
|
new mapboxgl.Popup()
|
|
|
|
|
.setLngLat({lat: coords[0], lng: coords[1]})
|
|
|
|
|
.setHTML("<b>" + words + "</b><br>" + coords[0] + ", " + coords[1])
|
|
|
|
|
.addTo(map);
|
|
|
|
|
map.animateMapIn(coords[0], coords[1], 18);
|
|
|
|
|
new mapboxgl.Popup()
|
|
|
|
|
.setLngLat({lat: coords[0], lng: coords[1]})
|
|
|
|
|
.setHTML("<b>" + words + "</b><br>" + coords[0] + ", " + coords[1])
|
|
|
|
|
.addTo(map);
|
|
|
|
|
map.animateMapIn(coords[0], coords[1], 18);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
alert(e);
|
|
|
|
|
}
|
|
|
|
|