javascript - How to show webapp's header bar on top of the external websites? -
let's suppose webapp has list of external urls. user clicks 1 of urls , goes website. how show first webapp's header on top of other websites?
these guys use iframe purpose, if try add page pinterest, example, stumbleupon's header , blank body because x-frame-options
of pinterest set sameorigin
.
to knowledge there no way put own app's header above site's content without using iframe, , without extension there no way bypass same origin rule.
if create chrome extension, should able request cross-origin permissions, , code should allowed embed unembeddable iframes.
from chrome docs:
by adding hosts or host match patterns (or both) permissions section of manifest file, extension can request access remote servers outside of origin.
{ "name": "my extension", ... "permissions": [ "http://www.google.com/" ], ... }
so should able add pattern *
request cors permissions on sites chrome extension. permissions
section designed ajax requests i'm not 100% sure approach works iframes, give shot.
from cursory research looks might not able request cross-origin permissions firefox extensions, unfortunately, chrome only.
Comments
Post a Comment