iframe

Chrome extension used to refresh pages

江枫思渺然 提交于 2019-12-12 18:33:00
问题 I was trying to develop a Chrome extension that can display me the last 3 news from a soccer news site (obviously the page is not open in any tab), by refreshing every 5 minutes. My ideea was to load the page inside an iframe and, once the page is loaded, access the page DOM and extract only the text nodes with the news. I've tried in many ways using ready and load functions, I tried to follow this solutions here but i always get warnings. My question is: is there a way I can do that without

Run script before iframe loads

狂风中的少年 提交于 2019-12-12 18:27:32
问题 I'm working with a help system which is embedded in an application. The important part of the help tries to have the same document.domain value, but the child iframe seems to run its document.domain setting before the parent does. This is a problem because it throws a security error and halts javascript execution. Here's basically what the html looks like, to give the proper idea: <html> <head> <!--Occasionally runs second--> <script src="change-document-domain.js"></script> </head> <body>

Angular 2 App Component ngOnInit called twice when using iframe

拟墨画扇 提交于 2019-12-12 18:19:04
问题 I'm working on an Angular 2 application that will be delivered via an iframe on other websites. Whilst testing I've noticed that when I load the application the App Component ngOnInit() function is being called twice. I'm finding this weird because when I'm testing the application 'on it's own', i.e. not though an iframe the App Component ngOnInit() is only called once. According to this answer this could happen due errors in child components. But in my case I'm not having the problem when

Access container of parent iframe element (Iframe inside iframe)

喜你入骨 提交于 2019-12-12 18:04:06
问题 I have next structure of elements: <div class="container"> <iframe class="outer"> .. <iframe class="inner"> actual markup with scripts here </iframe> </iframe> </div> using pure javascript, i've meneged to get out of "inner" iframe into outer one: //this is HTML tag of ".outer" iframe var parent = window.parent.document.getElementsByTagName('html')[0]; but still i need to get to ".container" element in order to manipulate it. Can anyone tell me how to get ".container" element from script

.htaccess redirect unless in iframe

会有一股神秘感。 提交于 2019-12-12 17:27:45
问题 When creating websites, I like to let my clients view the work in progress. At the moment I do this by uploading their website to a directory, and use .htaccess to password protect that directory. But keeping track of passwords and ensuring the directory is still protected after an update is becoming an issue. I have now created a user login system for my clients where they can login and be redirected to a preview of their site (in an iframe on the page preview.php?c=clientName). I have

Not able to switch to iframe using Selenium webdriver

点点圈 提交于 2019-12-12 17:27:10
问题 I am trying to click on SIGN IN link which is placed inside the iframe with class attribute "modalIframe". I have been trying for the past two days to find a solution for this but not able to. Any help would be really appreciated. Code as below public class Datereader { public static void main(String[] args) { System.setProperty("webdriver.gecko.driver","C:\\Users\\Madankumar\\Desktop\\Gecko Driver\\geckodriver.exe"); WebDriver driver=new FirefoxDriver(); driver.get("https://www.redbus.in/");

Change iframe source from another iframe

爱⌒轻易说出口 提交于 2019-12-12 17:23:49
问题 Ok, I have 2 iframes inside a parent page (for whatever reason). I have a navigation menu on parent page, which changes the source of iframe #1... iFrame #1's job, is to display ANOTHER navigation menu... Like a subnavigation menu... Now, how can I upon clicking an li inside iFrame #1, change the source of iframe #2? They're both on the same parent page... Aside from failing miserably, I also get a warning from Chrome's Dev tools - Unsafe JavaScript attempt to access frame with URL file:///C:

How to copy iframe content to div?

≯℡__Kan透↙ 提交于 2019-12-12 17:21:46
问题 See code snippet below. I want the output text in the iframe to show in the #source div. I’m struggeling with this, and am grateful for any ideas. How can I copy the output text in the iframe to a div? (The script writes "Can see text!" in div #show if div #sourcediv contains "Text", else "Cannot see text!".) <html> <body> <div id="source"></div> <div id="show"></div> <script> if (document.getElementById('source').innerHTML.indexOf("Text") != -1) {document.getElementById('show').innerHTML=

Html IFrame tag is not being interpret in email body

删除回忆录丶 提交于 2019-12-12 17:17:38
问题 I need to send a html file(which contains a iframe) inside a email body.The html file is working fine in a browser and playing a video.But when i send it inside email body,iframe tag is not getting interpreted so does not show in the body. This is html file. <b>Aman</b> <iframe height="390" frameborder="0" width="640" src="http://www.youtube.com/embed/Sf5T5KjMpJU?wmode=transparent" title="YouTube video player"></iframe> Email body only displaying a "Aman" in bold.This is C# code. StreamReader

How to force YouTube subtitles (closed captions) to appear by default even on iOS?

狂风中的少年 提交于 2019-12-12 16:58:02
问题 I own a YouTube video, and I typed up subtitles for it. I've tagged it with yt:cc=on , and I've embedded its iframe onto my website using cc_load_policy=1&cc=1 (see docs). When I visit my webpage using Chrome on my desktop, the captions appear by default, which is the desired experience. But when I visit the webpage using my iPhone (Chrome on iOS), the captions do not appear by default. How can I make captions appear by default on iOS? (They are available if I click the speech bubble icon,