Main changes:
+ alertMessage.innerHTML = `The Fantasy Map Generator is updated up to version ${version}.
+ This version is compatible with ${changelog}, loaded .map files will be auto-updated.
+
+ ${post}
- Lake Editor
- Coastline Editor
- New lake groups (types)
@@ -333,11 +336,8 @@ function showWelcomeMessage() {
- Map loading from URL
- Join our Reddit community and
- Discord server
- to ask questions, share maps, discuss the Generator, report bugs and propose new features.
-
- Thanks for all supporters on Patreon!
`;
+ Join our ${reddit} and ${discord} to ask questions, share maps, discuss the Generator, report bugs and propose new features.
+ Thanks for all supporters on ${patreon}!
`;
$("#alert").dialog(
{resizable: false, title: "Fantasy Map Generator update", width: "28em",
diff --git a/modules/save-and-load.js b/modules/save-and-load.js
index 78abbf78..40bdf458 100644
--- a/modules/save-and-load.js
+++ b/modules/save-and-load.js
@@ -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 wiki-page 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 = "archived version";
+ 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]) {
diff --git a/modules/utils.js b/modules/utils.js
index 12a99f9c..77f1463f 100644
--- a/modules/utils.js
+++ b/modules/utils.js
@@ -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 `${description}`
+ return `${description}`
}
// localStorageDB