38 lines
1.5 KiB
JavaScript
38 lines
1.5 KiB
JavaScript
var atiran_members = [
|
|
'https://midnadimple.com/',
|
|
'https://devraza.giize.com/',
|
|
'https://happybull.co.uk/'
|
|
]
|
|
|
|
var atiran_ringurl = "https://atiran.giize.com/";
|
|
var atiran_badgeurl = "https://atiran.giize.com/assets/badge.png";
|
|
|
|
var displayElement = document.getElementById("atiran");
|
|
|
|
var currentLocation = window.location.href;
|
|
var siteIndex = atiran_members.indexOf(currentLocation);
|
|
|
|
if (siteIndex == -1) {
|
|
displayElement.innerHTML =
|
|
"<p>I am sorry, but the atiran display has failed to find you in the member list.<br />Please contact the webring administrator for support if you are the webmaster of this site and believe this to be in error.</p>";
|
|
}
|
|
|
|
else {
|
|
var beforeID;
|
|
var afterID;
|
|
if (siteIndex == 0) { beforeID = atiran_members.length - 1; }
|
|
else { beforeID = siteIndex - 1; }
|
|
if (siteIndex == atiran_members.length - 1) { afterID = 0; }
|
|
else { afterID = siteIndex + 1; }
|
|
|
|
var randomID;
|
|
randomID = Math.floor(Math.random() * atiran_members.length);
|
|
|
|
displayElement.innerHTML =
|
|
"<p><a href='" + atiran_ringurl + "'><img alt='Badge: atiran webring' src='" + atiran_badgeurl + "' /></a></br>" +
|
|
"<a href='" + atiran_members[beforeID] + "'><< Previous</a> |" +
|
|
" <a href='" + atiran_members[randomID] + "'>Random</a> |" +
|
|
" <a href='https://libre.town/creative/development/librering.xhtml'>About LibreRing</a> |" +
|
|
" <a href='" + atiran_members[afterID] + "'Next</a> >>></p>";
|
|
}
|
|
|