oz-image-in-editor-obsidian
oz-image-in-editor-obsidian copied to clipboard
Feasibility of specifying a custom User Agent for iframe embeds
Might be nice to be able to set the UA for iframe embeds. My use case would be to set it to a mobile UA so that websites render in a more small-size friendly, content-forward way. It could also be useful for setting a robot/crawler UA to skip modals and other JS interrupts on some websites.
I see there's an abstraction for doing the CustomHtmlDecoration, wasn't sure how well that would play with throwing some script into the frame every time.
Do you think this FR is this generally interesting for your plugin or a little too niche?
Example, before:

Mockup, after (changed UA):

Noting that when I was playing around with this, I got a lot of "Blocked a frame with origin "app://obsidian.md" from accessing a cross-origin frame" -- reaching in and swapping the UA from the outside might not be feasible. iframes support specifying a CSP but I'm not sure if that's enough to support this.