browser: update dark stylesheet, drop light
[sheet.git] / browser.plp
index 005ab167f9295c9ea474c16d92af97197345bfd8..b82f5fb6b2eeeab4d3575411b80a5f37b9071d46 100644 (file)
@@ -9,7 +9,7 @@ Html({
        description =>
                "caniuse.",
        keywords => [qw'html css browser feature'],
-       stylesheet => [qw'light dark circus mono red'],
+       stylesheet => [qw'circus dark mono red'],
        data => ['browser-support.inc.pl'],
 });
 
@@ -182,6 +182,19 @@ sub showversions {
 }
 
 :>
+<script>
+var classmatch = /\bopacity(\d+)/;
+Array.forEach(document.getElementsByTagName('TD'), function(val) {
+       var opacity;
+       if (opacity = classmatch.exec(val.className)) {
+               var c = document.defaultView.getComputedStyle(val, null).getPropertyValue('background-color');
+               var o = opacity[1] / 100;
+               val.style.backgroundColor = c.replace(/rgb\((.*)\)/, 'rgba($1, '+o+')');
+               val.style.textShadow = c+' 1px 1px 2px, ' + c+' -1px -1px 2px';
+       }
+});
+alert(t);
+</script>
 <hr>
 
 <div class="legend">