Stumble and Digg Begging
Need a javascript version of Eli’s Stumble and Digg Begging script? Look no further.
Add this code somewhere to your page:
<script language=”javascript” type=”text/javascript”>
if (document.referrer.indexOf(“stumbleupon”) > 0)
{
alert(‘Glad you stumbled upon us. Please leave us a nice review if you enjoy the site!’);
}else if (document.referrer.indexOf(“digg”) > 0)
{
alert(‘Glad you found us on Digg. Please Digg up if you like!’);
}
</script>
<noscript>You need javascript installed to see a custom welcome message from <a href=”topnewstrends.com“>Top News Trends</a></noscript>
For wordpress users you could put it in your footer.php or use this plugin to do the same via div tag rather than alert.
Top News Trends