on master help sign in
random redirect support for Firefox and Edge
d996d50jai
portal.js+12−3
@@ -31,6 +31,13 @@ function Portal(sites)
31 {
31 {
32 setTimeout(()=>{ window.location.reload() },500)
32 setTimeout(()=>{ window.location.reload() },500)
33 }
33 }
34+
35+ this.navigate = function(target)
36+ {
37+ setTimeout(() => {
38+ window.location.href = target
39+ },3000)
40+ }
34
41
35 this.location = function()
42 this.location = function()
36 {
43 {
@@ -63,12 +70,14 @@ function Portal(sites)
63 {
70 {
64 var location = this.locate();
71 var location = this.locate();
65 var target = this.next(location);
72 var target = this.next(location);
73+ this.navigate(target)
66
74
67 var html = ""
75 var html = ""
68
76
69 html = `Redirecting to ${target}
77 html = `Redirecting to ${target}
70− <meta http-equiv="refresh" content="3; url=${target}">
78+<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>`
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+`
72 return html
81 return html
73 }
82 }
74−}
83+}