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