Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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 http://perlmonks.com/?node_id=872091 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 http://userscripts.org/)

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-09-02 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (21 votes), past polls