<!DOCTYPE html>
<head>
+ <meta charset="utf-8" />
<meta lang="en" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
console.log('loaded libnemo')
}
async function loadUx () {
- if (location.hash) {
- const page = document.querySelector(location.hash)
- page.classList.add('show')
- } else {
- location += '#transact'
+ try {
+ document.querySelector(location.hash).classList.add('show')
+ } catch (err) {
+ location.hash = '#transact'
}
}
function switchPage (evt) {
const oldHash = new URL(evt.oldURL)?.hash
const newHash = new URL(evt.newURL)?.hash
if (oldHash) {
- document.querySelector(oldHash).classList.remove('show')
+ document.querySelector(oldHash)?.classList.remove('show')
}
+ try {
if (newHash) {
document.querySelector(newHash).classList.add('show')
+ }
+ } catch (err) {
+ notify.warn(`Page not found`)
}
}
function getWalletClass (algorithm) {