X-Git-Url: http://git.roojs.org/?p=app.webkitpdf;a=blobdiff_plain;f=domains%2Fremove_print_css.js;h=b2e7d6581d9176156fbe8e89d03734150ecf7589;hp=ac136ceefbcaf2fe47cb41d2efe4a117146e8e4b;hb=ab29839fd49283578307b499d5a062aa56f10b3d;hpb=6d6cb84a885a8451e33b64bed99ad3a82a13efe6 diff --git a/domains/remove_print_css.js b/domains/remove_print_css.js index ac136ce..b2e7d65 100644 --- a/domains/remove_print_css.js +++ b/domains/remove_print_css.js @@ -45,12 +45,19 @@ } // see if getting rid of 'only' from screen works. - if(!ar[i].cssText.match(/only\s+screen/)) { - newsheet += ar[i].cssText +"\n"; + if(ar[i].cssText.match(/only\s+screen/)) { + var str = ar[i].cssText.replace(/only\s+screen/, ''); + newsheet += str +"\n"; + continue; + } + if(ar[i].cssText.match(/screen\s+and/)) { + var str = ar[i].cssText.replace(/screen\s+and/, ''); + newsheet += str +"\n"; continue; } - var str = ar[i].cssText.replace(/only\s+screen/, 'screen'); - newsheet += str +"\n"; + newsheet += ar[i].cssText +"\n"; + + }