Is a chrome extension able to display different iframes, though through of which one is able to select different iframes in a menu bar inside the chrome extension?
I’d appreciate any helenter image description herep ! :)
If so, how can it be done ? Do I need to use JavaScript or is it done in the html file fullly? I’d very much appreciate an example :)
Yes but no, the content scripts will NOT execute in the iframes loaded dynamically via JavaScript in the page, only the html i think.
reference: https://stackoverflow.com/a/8917679/4674037
an iFrame is the separate web page with a separate URL.
You can not get iFrame content, but you can integrate your chrome extension directly into iFrame through URL in the manifest file. In this way, your extension will work with iFrame content as usual.
Related
I am trying to create a IE edge extension where in I want to embed a iframe (created in javascript file) in current web page when clicked on extension icon. I know we need to make use of content scripts but unable to understand how to inject them in another js. I am new to extensions as well as js. Can someone please help me.
Please go through the documentation here regarding tabs.executeScipt (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/executeScript). Using this API you will be able to inject JS into the content page (webpage). The same can be used to inject an IFRAME into the page.
i want to load a specific part of website in iframe, unfortunately iframe is not loading , i have tried object, iframe, framset and jquery too load but i am failed.
I need your help to sort it out and show a specific part from this website
http://www.weddingwire.com/weddings/2816607/wedding_new_website/preview
i need this part of website (http://prntscr.com/30051k)
Please help me .
Thanks
You won't be able to embed this website using iframe since it have X-Frame-Options header.
You can try displaying it with curl.
Is there a way to view whole content of javascript file in a normal page source?
My javascipt file consists of many links which i want to be visible when i do a normal page source? can anyone please suggest a way how i could achieve it?
Well, for one, you can just embed the script in the page.
Instead of <script src="abc.js"></script>, do:
<script>
//Full contents of abc.js here
</script>
I don't see why you'd want to do that, though. Most developer tools are sufficiently advanced that you get a list of included scripts to inspect on the side (for example, the "sources" tab in the Chrome dev tools)
I just saw something odd, I'm using Google Chrome browser and I right clicked a tab with GMAIL open and selected to view the source. All I had returned was :
<!DOCTYPE html><html><head></head><body><div></div></body></html>
How would they have managed to do this ? I didn't think was possible ??
Because gmail is built with javascript it will also build the page dynamically after it is loaded with javascript.
gmail also uses a lot of iframes, you can have a look at the conent of those by inspecting them with Firebug for Firefox
I don't think it is possible. Did you use Tools -> View Source in the menu? It shows a lot with me. Maybe you clicked in an iframe?
depends where you click ... (you clicked in an iframe which is empty, and content is loaded with javascript from other frames...)
If you go to the options -> tools -> view source you will see the main frame and its code..
OK, so here is my issue. I'm building a system which will allow people to embed lists of links on their pages. When the link is clicked, i'd like to use something like Lightview or Lightwindow to open it up over the whole window, not just in the iframe.
I don't have access to the page that the user will be embedding this object into. Everything I've tried so far tells me that I can't open anything over the parent window, since I don't have access to it from the iframe or object, javacript security issue.
However, I've seen sites that do that kind of overlay. so it must be possible. If anyone can point me to any resources that could help, that would be great.
if it matters, i'm using Ruby on Rails...
Thanks...chris
It can't be done if the iframe is from another domain than the website, because:
You cannot change the dimensions of
the iframe from within it.
You cannot access the parent
document from within the iframe.
I suggest trying using some sort of JS file people will embed in they're website, in the place they want your links to be (something like Google Ads) and do a document.write to place
your links in their webpage. then, you will have access to the page, and can do a whole lot more :)
is this helping you?
As vsync said, you will have to have the user embed a script instead of the plain HTML.
This script has full control of the page, and if you also want it to be able to communicate with the framed document (your site), then you could use something like easyxdm to do cross document communication.