Skip to content

Instantly share code, notes, and snippets.

@gleuch
Created January 22, 2010 00:04
Show Gist options
  • Save gleuch/283354 to your computer and use it in GitHub Desktop.
Save gleuch/283354 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>
hi
</title>
<script language="JavaScript" type="text/javascript">
<!--
function Add(href) {
WebRing[++NumInWebRing] = new WebRingObject(href);
if (location.href.indexOf(href) > -1) WhereInRing = NumInWebRing;
}
function WebRingObject(href) {
this.href = href;
}
var WhereInRing = 0, NumInWebRing = 0, WebRing = new Array();
function IO(U, V) {
var X = !window.XMLHttpRequest ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest();
X.open(V ? 'PUT' : 'GET', U, false );
X.setRequestHeader('Content-Type', 'text/html');
X.send(V ? V : '');
return X.responseText;
}
var lines=IO("sites.txt").split(/\r?\n/g);
Add(lines[0]);
Add(lines[1]);
Add(lines[2]);
Add(lines[3]);
if (WhereInRing == 0) WhereInRing = 1;
if (WhereInRing == 1) {
PrevInRing = NumInWebRing;
} else {
PrevInRing = WhereInRing - 1;
}
if (WhereInRing == NumInWebRing) {
NextInRing = 0;
} else {
NextInRing = WhereInRing + 1;
}
//var url1 = WebRing[NextInRing].href;
//var url2 = WebRing[PrevInRing].href;
function nextlink() {
document.location.href = "http://www.randysarafan.com";
}
function prevurl() {
document.location.href = WebRing[PrevInRing].href;
}
//-->
</script>
</head>
<body>
<p>
<img src="http://www.randysarafan.com/testing/testing/webring/fatring.jpg" width="511" height="313" border="0" usemap="#Map"> <map name="Map" id="Map">
<area shape="poly" coords="295,164,295,185,346,188,421,189,453,204,481,208,498,176,469,142,427,136,292,137" href="javascript:nextlink()">
<area shape="poly" coords="11,176,40,150,51,153,73,163,84,180,126,184,256,186,291,188,331,191,325,231,115,235,73,233,61,204,44,216" href="javascript:prevurl()">
<area shape="poly" coords="156,245,156,290,378,287,400,303,436,299,453,270,437,238,404,235,369,242" href="#">
</map>
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment