Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: PM Stylesheet on local filesystem?

by Anonymous Monk
on Nov 18, 2010 at 02:31 UTC ( #872116=note: print w/ replies, xml ) Need Help??

in reply to PM Stylesheet on local filesystem? WORKS!

It works for me, that is, I get a security error in the Error Console (Ctrl+Shift+J)

Security Error: Content at may no +t load or link to file:///C:/local.nonsense.css.
I say its a good idea to not allow websites to access random files on my computer.

The generic way to do this is with Greasemonkey plugin (and

You could also do it with a bookmarklet, but that means an extra click

javascript:(function(){ function addRawCss(styles){ var newSS; if(d +ocument.createStyleSheet){ document.createStyleSheet("javascript:'" + + styles.replace(/'/g,"\\'") + "'"); }else{ newSS=document.createEleme +nt("link"); newSS.rel="stylesheet"; newSS.href="data:text/css,"+escap +e(styles); document.documentElement.childNodes[0].appendChild(newSS); + } } addRawCss("body { color: yellow !important; background-color: bl +ack !important; }"); })()

Comment on Re: PM Stylesheet on local filesystem?
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://872116]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-10-07 05:33 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (170 votes), past polls