ar[i].setAttribute('media','all');
}
ar = document.getElementsByTagName('link');
- for( i=0;i<ar.length;i++) {
+ for( i=ar.length-1;i> -1;i--) {
if (ar[i].getAttribute('rel') != 'stylesheet') {
continue;
}
if (!m) {
continue;
}
- if (m.match(/print/)) {
- ar[i].setAttribute('media','speech'); // hacky
+ if (!m.match(/print/)) {
+ ar[i].setAttribute('media','all');
+
continue;
}
- ar[i].setAttribute('media','all');
+
+ ar[i].parentNode.removeChild(ar[i]); // hacky
+
}
for (var ss = 0; ss < document.styleSheets.length; ss++) {
var css =document.styleSheets[ss];