javascrtipt access to style sheets.
January 29, 2006 4:19 PM
Subscribe
javascript question: im looking for a way to access the style sheet text in firefox.
im looking for the full text - like with the comments and everything, not just the cssText attribute of each individual cssRule.
for an example, see the "Edit CSS" option in the developer plug in.
background information: im writting a greaseMonkey script that will allow you to view/edit the markup and css of a page you're viewing. In order to make the CSS editable, i need a way to quickly and easily grab the text from all the style sheets and move them into one style tag, then disable the originals. Ive got a working copy, except that i have to cycle through all the cssRules and grab the text of each and append it to the new style tag - which is slow, destroys the orginal formatting and leaves out any comments.
posted by Tryptophan-5ht to computers & internet (6 comments total)
(And, askMefi is great for hard-to-categorize questions, but for specific questions like this, the Mozilla extension forum is going to provide you with a lot more eyes that know javascripting for Mozilla.)
posted by orthogonality at 4:49 PM on January 29, 2006