Minor cleanup

This commit is contained in:
Devine Lu Linvega 2018-05-17 11:36:32 +12:00
parent 518528ea14
commit 4490dffda6
2 changed files with 13 additions and 5 deletions

View File

@ -3,10 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="scripts/portal.js"></script>
<link rel="stylesheet" type="text/css" href="links/reset.css"/>
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
<link rel="stylesheet" type="text/css" href="links/main.css"/>
<script src="portal.js"></script>
<title>Webring</title>
</head>
<body>
@ -19,5 +16,10 @@
var portal = new Portal(sites);
portal.start();
</script>
<style>
body { background:#eee; padding:30px; }
body a { color:#000; display: inline-block; padding:0px 5px; line-height: 20px}
body a:hover { color:#eee; background:#000; text-decoration: none; }
</style>
</body>
</html>

View File

@ -22,10 +22,16 @@ function Portal(sites)
var site = this.sites[id]
html += `${id}) <a href='${site}'>${site}</a>\n`
}
html += `\n<a href='#random' onClick="window.location.reload()">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a>`
html += `\n<a href='#random' onClick="portal.reload('random')">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a>`
return html
}
this.reload = function()
{
console.log("!!")
setTimeout(()=>{ window.location.reload() },500)
}
this.location = function()
{