in reply to Re^2: Optional vote explanation box as an anonymous message sender.
in thread Optional vote explanation box as an anonymous message sender.
I love those funny quotes. I thought it would be cool to have one of them displayed on every PerlMonks page.
So I came up with the following Free Nodelet Hack, which displays a string, chosen at random from a list. If you integrate this with your Free Nodelet, then each time a page is loaded one of the fortunes is displayed in the nodelet. (Actually, the <p id="fortune_p"></p> could be anywhere, such as in your Personal Nodelet.)
<p id="fortune_p"></p> <script type="text/javascript"> <!-- var fortunes = new Array( "Abandon desire", "Abandon normal instruct +ions", "Accept advice" ); // etc. var p = document.getElementById('fortune_p'); var txt = document.createTextNode( fortunes[ Math.floor( Math.rando +m() * fortunes.length ) ] ); p.appendChild(txt); // --> </script>
|
|---|