html - Override @media style using JavaScript -


i need save pdf pages of screened web site mozilla ff. i've stumbled upon site css protection prevents print (and print pdf): prints blank page. need pure javascript, when run js console override @media print styles. tried few commands without success. know how manually need easier way.

the css stylesheet

* {-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none;-o-user-select: none;user-select: none;} @media print {html, body {display: none;}} 

ps. nice text select prevention too, not important.

one option override css injecting <style> <head> this:

var override = document.createelement("style"); override.innertext = "* {user-select: auto;} @media print {html, body {  display: block; }}"; document.head.appendchild(override); 

example on codepen (try print preview , without js)


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -