diff --git a/components/fill-box.js b/components/fill-box.js index 02912f3b..b4d075c3 100644 --- a/components/fill-box.js +++ b/components/fill-box.js @@ -1,7 +1,5 @@ -// fill-box cannot use Shadow DOM as it needs access to svg hatches -// append stylesheet { - const style = ` + const style = /* css */ ` fill-box:not([disabled]) { cursor: pointer; } @@ -14,7 +12,8 @@ fill-box > svg > rect { stroke: #666666; stroke-width: 2; - }`; + } + `; const styleElement = document.createElement("style"); styleElement.setAttribute("type", "text/css"); @@ -24,7 +23,7 @@ { const template = document.createElement("template"); - template.innerHTML = ` + template.innerHTML = /* html */ ` @@ -70,5 +69,6 @@ } } + // cannot use Shadow DOM here as need an access to svg hatches customElements.define("fill-box", FillBox); } diff --git a/main.js b/main.js index cdb329af..39a70d29 100644 --- a/main.js +++ b/main.js @@ -176,8 +176,8 @@ oceanLayers.append("rect").attr("id", "oceanBase").attr("x", 0).attr("y", 0).att document.addEventListener("DOMContentLoaded", async () => { if (!location.hostname) { const wiki = "https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Run-FMG-locally"; - alertMessage.innerHTML = `Fantasy Map Generator cannot run serverless. - Follow the instructions on how you can easily run a local web-server`; + alertMessage.innerHTML = /* html */ `Fantasy Map Generator cannot run serverless. Follow the instructions on how you can + easily run a local web-server`; $("#alert").dialog({ resizable: false, @@ -455,9 +455,10 @@ function showWelcomeMessage() { const discord = link("https://discordapp.com/invite/X7E84HU", "Discord server"); const patreon = link("https://www.patreon.com/azgaar", "Patreon"); - 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. -