I would like to add an extra stylesheet for my site if it's being embedded inside an iframe on another site.
I found a JS method to try detecting an iframe embed over here: https://stackoverflow.com/questions/326069
Basically, you can run a script like:
if (top === self) { not in a frame } else { in a frame }
But I was wondering if it's possible to have that code add a stylesheet to the page in Drupal. Or maybe if there were some way to do it in Drupal, in hook_init() or something, that would be even better...
A final method I could think about is using the JS above to maybe add a URL parameter like ?embed=TRUE
so I can detect that and add a stylesheet... but that would require a refresh inside the iframe :-/