mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
v1.11.5
This commit is contained in:
parent
a836e066d8
commit
46ebc938e9
4 changed files with 24 additions and 24 deletions
|
|
@ -268,7 +268,7 @@ async function saveMap() {
|
|||
// download map data as GeoJSON
|
||||
function saveGeoJSON() {
|
||||
alertMessage.innerHTML = `You can export map data in GeoJSON format used in GIS tools such as QGIS.
|
||||
Check out <a href="https://github.com/Azgaar/Fantasy-Map-Generator/wiki/GIS-data-export" target="_blank">wiki-page</a> for guidance`;
|
||||
Check out ${link("https://github.com/Azgaar/Fantasy-Map-Generator/wiki/GIS-data-export", "wiki-page")} for guidance`;
|
||||
|
||||
$("#alert").dialog({title: "GIS data export", resizable: false, width: "32em", position: {my: "center", at: "center", of: "svg"},
|
||||
buttons: {
|
||||
|
|
@ -497,7 +497,7 @@ function uploadMap(file, callback) {
|
|||
const mapVersion = data[0].split("|")[0] || data[0];
|
||||
if (mapVersion === version) {parseLoadedData(data); return;}
|
||||
|
||||
const archive = "<a href='https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Changelog' target='_blank'>archived version</a>";
|
||||
const archive = link("https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Changelog", "archived version");
|
||||
const parsed = parseFloat(mapVersion);
|
||||
let message = "", load = false;
|
||||
if (isNaN(parsed) || data.length < 26 || !data[5]) {
|
||||
|
|
|
|||
|
|
@ -551,11 +551,6 @@ function parseError(error) {
|
|||
return errorParsed;
|
||||
}
|
||||
|
||||
// open URL in a new tab or window
|
||||
function openURL(url) {
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
// polyfills
|
||||
if (Array.prototype.flat === undefined) {
|
||||
Array.prototype.flat = function() {
|
||||
|
|
@ -581,9 +576,14 @@ function getAbsolutePath(href) {
|
|||
return link.href;
|
||||
}
|
||||
|
||||
// open URL in a new tab or window
|
||||
function openURL(url) {
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
// wrap URL into html a element
|
||||
function link(URL, description) {
|
||||
return `<a href="${URL}" target="_blank">${description}</a>`
|
||||
return `<a href="${URL}" rel="noopener" target="_blank">${description}</a>`
|
||||
}
|
||||
|
||||
// localStorageDB
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue