Skip to content

Instantly share code, notes, and snippets.

@saranrapjs
Created April 6, 2012 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saranrapjs/2315797 to your computer and use it in GitHub Desktop.
Save saranrapjs/2315797 to your computer and use it in GitHub Desktop.
webring javascript
<div id="thanks-txt" style="width:343px;height:434px;">THANK YOU FOR SHOPPING HERE YOUR BUSINESS IS APPRECIATED</div>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//ilikenicethings.com/thanks.js ";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","thanks-js");</script>
var p = document.createElement('p'),
a = p.appendChild(document.createElement('a')),
img = a.appendChild(document.createElement('img')),
container = document.getElementById('thanks-txt'),
links = [
"http://ilikenicethings.com/",
"http://sitebag.biz/",
"http://newyorkcirculars.info/",
"http://bigboy.us/",
"http://whatisthisthingcalled.com/"
];
container.innerText = '';
a.setAttribute("href",links[Math.floor(Math.random() * links.length)]);
p.setAttribute("style", "text-align:center;");
img.setAttribute('alt', "THANK YOU FOR SHOPPING HERE YOUR BUSINESS IS APPRECIATED");
img.setAttribute('src', "http://newyorkcirculars.info/thankyouforshopping.png");
img.setAttribute('style', "border:3px solid #000;");
container.appendChild(p);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment