Add missing files
[wiki.git] / GuruMeditation.js
1 <script language="JavaScript" type="text/javascript">
2 // Copyright 2008, 2009 Bernie Innocenti <bernie@codewiz.org>
3 //
4 // FIXME: The following JS snippet is harder to pass than ACID 3
5
6 var guru = document.getElementById('guru');
7
8 // Firefox 2.0 doesn't take border-color, but returns border-top-color fine
9 var color = document.defaultView.getComputedStyle(guru,null).getPropertyValue('border-top-color');
10
11 function guruOn() {
12         guru.style.setProperty('border-color', color, '');
13         setTimeout('guruOff()', 1000);
14 }
15 function guruOff() {
16         guru.style.setProperty('border-color', '#000000', '');
17         setTimeout('guruOn()', 1000);
18 }
19 // Safari 2.0 returns this rgba crap
20 // Konqueror 3.5.6 doesn't seem to support computed properties
21 if (color && color != 'rgba(0, 0, 0, 0)') {
22         //window.alert("enabled! color='" + color + "'");
23         guruOn();
24 }
25 </script>