@@ -1,3 +1,5 @@
1+'use strict';
2+
13function Portal(sites)
24{
35 this.el = document.createElement("div");
@@ -26,10 +28,10 @@ function Portal(sites)
2628
2729 this.directory = function()
2830 {
29− var html = ""
31+ let html = ""
3032
31− for(var id in this.sites){
32− var site = this.sites[id]
33+ for(let id in this.sites){
34+ let site = this.sites[id]
3335 html += `<ln>${id}) <a href='${site}'>${site.split("//")[1]}</a></ln>`
3436 }
3537 return `<list>${html}</list>\n${this.readme()}${this.buttons()}`
@@ -54,14 +56,14 @@ function Portal(sites)
5456
5557 this.locate = function()
5658 {
57− var hash = this.location();
59+ let hash = this.location();
5860
5961 if(hash == "random"){
6062 return Math.floor(Math.random()*this.sites.length)
6163 }
6264
63− for(var id in this.sites){
64− var site = this.sites[id];
65+ for(let id in this.sites){
66+ let site = this.sites[id];
6567 if(site.indexOf(hash) >-1){
6668 return parseInt(id)
6769 }
@@ -76,8 +78,8 @@ function Portal(sites)
7678
7779 this.redirect = function()
7880 {
79− var location = this.locate();
80− var target = this.next(location);
81+ let location = this.locate();
82+ let target = this.next(location);
8183 this.navigate(target)
8284 return `<p>Redirecting to <b>${target}</b></p><meta http-equiv="refresh" content="3; url=${target}">
8385 <p class='buttons'><a href='#' onClick="portal.reload('')">Directory</a> | <a href='#${target}' onClick="portal.reload('random')">Skip</a> | <a href='#random' onClick="portal.reload('random')">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a> <a id='icon' href='#random' onClick="portal.reload('random')"></a></p>`