Skip to content

Commit

Permalink
fix warning: "Image elements do not have explicit width and height" #326
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Mar 6, 2023
1 parent e651516 commit f6a0eff
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,22 @@
</head>
<body>
<div id="loading">
<img src="icons/Icon-192.png" alt="dwyl logo" height="128px" />
<img src="icons/Icon-192.png" alt="dwyl logo" height="128px" width="128px" />
<h1>do what you love</h1>

<button onclick="human();">I am not a robot</button>
</div>
<script>
window.addEventListener('load', function(ev) {
// Only Load Flutter App if Human
// localStorage.getItem('human') && load();
localStorage.getItem('human') && load();
});

function human() {
// console.log('human')
localStorage.setItem('human', true);
load();
}

function load() {
loadScript('flutter.js').then(() => {
// Download main.dart.js
Expand All @@ -60,12 +65,6 @@ <h1>do what you love</h1>
});
})
}

function human() {
console.log('human')
localStorage.setItem('human', true);
load();
}

function loadScript(src) {
return new Promise(function (resolve, reject) {
Expand All @@ -74,7 +73,7 @@ <h1>do what you love</h1>
script.onload = function () { resolve(); };
script.onerror = function () { reject(); };
document.body.appendChild(script);
console.log('loaded ', src)
// console.log('loaded ', src)
});
}
</script>
Expand Down

0 comments on commit f6a0eff

Please sign in to comment.