Create url-blank

This commit is contained in:
Sergey Chumak 2020-06-09 19:21:18 +03:00 committed by GitHub
parent 4d13bc210a
commit 81c5d1c661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
<!doctype html>
<html>
<head>
<style>
html {
font-family: sans-serif;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>Check URL in address bar (should not be blank)</h1>
<script>
setTimeout(function() {
window.location.hash = '%A0';
// Also works with the value below
// window.location = 'https://example.com/%A0';
}, 5);
var accountInfo = document.getElementById('accountInfo');
var requestPermissionBtn = document.getElementById('requestPermission');
requestPermissionBtn.addEventListener('click', function(e) {
sendAPIrequest('web3').then(function(e) {
accountInfo.innerText = e;
}).catch(function(e) {
alert('Error: '+e);
});
});
</script>
</body>