Skip to content

Commit

Permalink
Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
phieri committed Oct 17, 2024
1 parent 35f3b8b commit edf87d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div id="uncert"></div>
<div class="northing" id="sweref-n">N</div>
<div class="easting" id="sweref-e">E</div>
<button id="pos-btn">Starta</button>
<button id="pos-btn" disabled>Starta</button>
<button class="secondary" id="share-btn" disabled>Dela</button>
</main>
<footer class="container">
Expand Down
2 changes: 1 addition & 1 deletion _site/om.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>Om sweref99.nu</h1>
</header>
<main class="container">
<p>Betaversion av webbapp som visar positionen i SWEREF 99 TM.</p>
<p><a href="https://github.com/phieri/sweref99-nu">https://github.com/phieri/sweref99-nu</a></p>
<p>Utveckling på GitHub: <a href="https://github.com/phieri/sweref99-nu">https://github.com/phieri/sweref99-nu</a></p>
<a href="https://sweref99.nu/">Tillbaka till webbappen</a>
</main>
</body>
Expand Down
3 changes: 3 additions & 0 deletions src/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function isInSweden(pos: any) {
const uncert = document.querySelector("#uncert");
const swerefn = document.querySelector("#sweref-n");
const swerefe = document.querySelector("#sweref-e");
const startbtn = document.querySelector("#start-btn");
const sharebtn = document.querySelector("#share-btn");


Expand Down Expand Up @@ -61,6 +62,8 @@ document.addEventListener(

if (!("geolocation" in navigator)) {
window.alert("Fel: platstjänsten är inte tillgänglig.");
} else {
startbtn!.removeAttribute("disabled");
}

const btn = document.querySelector("#share-btn");
Expand Down

0 comments on commit edf87d7

Please sign in to comment.