on master help sign in
random redirect support for Firefox and Edge

auto refresh is disabled by default on both Firefox and Edge, this fixes it.

commitd996d5048b5cc897b60839689b39464aa742c230 authorjai <locasciojacopo@gmail.com> dateFri 18 May 2018, 00:39 (8 years ago) parentc757a11
1 file changed+12−3
portal.js+12−3
portal.js+12−3
@@ -31,6 +31,13 @@ function Portal(sites)
3131 {
3232 setTimeout(()=>{ window.location.reload() },500)
3333 }
34+
35+ this.navigate = function(target)
36+ {
37+ setTimeout(() => {
38+ window.location.href = target
39+ },3000)
40+ }
3441
3542 this.location = function()
3643 {
@@ -63,12 +70,14 @@ function Portal(sites)
6370 {
6471 var location = this.locate();
6572 var target = this.next(location);
73+ this.navigate(target)
6674
6775 var html = ""
6876
6977 html = `Redirecting to ${target}
70− <meta http-equiv="refresh" content="3; url=${target}">
71−<a href='' onClick="window.location.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>`
78+<meta http-equiv="refresh" content="3; url=${target}">
79+<a href='' onClick="window.location.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>
80+`
7281 return html
7382 }
74−}
83+}