ResourceOverride icon indicating copy to clipboard operation
ResourceOverride copied to clipboard

Enable injection to top frames only

Open yehudasabag opened this issue 8 years ago • 1 comments

I really need the option to inject my scripts to only top frames and not all the iframes in the page. I created this issue and will create a pull request for adding this kind of support. What I had in mind is a global option (some kind of checkbox) for 'inject only to top frames' which will be off be default. @kylepaulsen WDYT? Is it OK with you? Thanks

yehudasabag avatar Jan 23 '17 07:01 yehudasabag

This seems reasonable. I'll add it to my list of todo's. Feel free to submit a PR and I'll give it a look. Otherwise I'll get around to it eventually.

For the time being, you can do a quick fix yourself with a check in your inject rule to see if you are in a frame before executing what you want: http://stackoverflow.com/questions/326069/how-to-identify-if-a-webpage-is-being-loaded-inside-an-iframe-or-directly-into-t

kylepaulsen avatar Jan 23 '17 08:01 kylepaulsen