Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript ability to use cross domain css on another site… possible with JS? Reply To: ability to use cross domain css on another site… possible with JS?

#153611
timaging
Participant

so, apparently it is possible. I have a friend that’s done it but he hasn’t done it in a while. This is what he recalls so far:

_collect all the content into a javascript array.

It may be that you can use a dom object for that – something that can hold the whole document as an html object.

Then you can iterate over the object element by element and add a style attribute. Finally, add a link to your css sheet in the header of your dom object.

Then write the object out to the page.

In effect, you’ve scraped the other page, and are writing your own version.
_
I just don’t know how to write that. I’ll see if he can help me and if so we can show you how to do it.