diff --git a/404.html b/404.html index 06ad764..d3922ae 100644 --- a/404.html +++ b/404.html @@ -9,8 +9,8 @@ permalink: /404.html diff --git a/index.html b/index.html index addb9bb..1a394ed 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ diff --git a/scripts/portal.js b/scripts/portal.js index 9dde826..f607856 100644 --- a/scripts/portal.js +++ b/scripts/portal.js @@ -1,3 +1,5 @@ +'use strict'; + function Portal(sites) { this.el = document.createElement("div"); @@ -26,10 +28,10 @@ function Portal(sites) this.directory = function() { - var html = "" + let html = "" - for(var id in this.sites){ - var site = this.sites[id] + for(let id in this.sites){ + let site = this.sites[id] html += `${id}) ${site.split("//")[1]}` } return `${html}\n${this.readme()}${this.buttons()}` @@ -54,14 +56,14 @@ function Portal(sites) this.locate = function() { - var hash = this.location(); + let hash = this.location(); if(hash == "random"){ return Math.floor(Math.random()*this.sites.length) } - for(var id in this.sites){ - var site = this.sites[id]; + for(let id in this.sites){ + let site = this.sites[id]; if(site.indexOf(hash) >-1){ return parseInt(id) } @@ -76,8 +78,8 @@ function Portal(sites) this.redirect = function() { - var location = this.locate(); - var target = this.next(location); + let location = this.locate(); + let target = this.next(location); this.navigate(target) return `

Redirecting to ${target}

Directory | Skip | Random | Information

`