FancyBox2 official demo - YouTube doesn't load first time in IE9 - youtube

I have noticed specific behavior of FancyBox2 Demo in IE9, maybe someone could tell, what causes the problem or how it could be fixed. I mean youtube link, which uses fancybox-media class. When I open demo by using link 'standalone version' on http://fancyapps.com/fancybox/#examples, youtube link works properly and window with movie opens immediately, but when I clean the browsing history and then open site by pasting http://fancyapps.com/fancybox/demo/ into URL bar, youtube window doesn't open the first time and succeeds the next time. It makes the example source code used in any different site couses the same problem. Maybe explanation is simple but I'm not very familiar with jquery and any tip will be usefull.

Related

Webpack url-loader PDF data URI link for Vue site stops working in iOS 14

I have a Vue.js website with a PDF file which is included in my ultimate javascript bundle via webpack. (It's my CV.) The following build and delivery process has worked perfectly fine for me since 2017, but suddenly stopped working in iOS 14:
Build the PDF with LaTeX.
Use webpack's url-loader to include the PDF in my webpack bundle as a base64 data URI.
Load that URL into a vuex data store, and then just deliver it as a link when clicked.
For the last three years, this has worked fine: I've been able to click on the link and get a working PDF. It's been kind of random and platform-specific whether the PDF opens in-browser or shows up in a download folder, and whether it gets the filename I've asked it to get or not, but, well, that doesn't matter to me. And the core functionality of click the link and get the PDF has worked on every browser and every platform I've ever tried it on.
All of a sudden, with iOS 14, it's stopped working. Now, when I try to activate the PDF link in iOS Safari, nothing happens at all. When I do it in iOS Chrome, it produces a little popup claiming it downloaded a document, but nothing seems to actually be able to open the document. And when I do it in iOS DuckDuckGo, it just displays the base64 data URI in the address bar.
Interestingly, if I take the dataURI that DDG displays in the address bar and copy and paste it into Safari or Chrome on iOS, it actually displays my pdf. So the browsers still have the capacity to display a PDF from a data URI. It just doesn't want to do so from my link.
And my site still works as expected on the desktop. Including in Safari on the desktop. Also, it still works on my wife's phone (she's still on iOS 13). So this is clearly something Apple changed in iOS 14. But what? And how to get my site working again?
I'm guessing that Apple has changed the behavior of the renderer in iOS in some fashion to cause it to break across browsers but nowhere else (since browsers in iOS are all still required to rely on webkit, right?)
This is a pretty important feature to me. I made this decision deliberately for perceived performance---combined with pre-rendering, everything on my site, including the PDF, loads very close to instantly from the user perspective. So I'd really like to keep it.
I'm using Webpack 2.6.1 and Vue 2.3.3. This is a stable build that has been working flawlessly for three years, so I haven't felt the need to update anything except for security updates.
After searching around, I did find this Apple dev discussion which suggests that in iOS 14, Apple newly blocks redirects to data URIs. But I'm not doing a redirect, I'm actually navigating directly to the URI through a link. And the linked discussion suggests that the newly banned behavior just brings Apple in line with what other browsers already ban---but my code works in every other browser, so that can't be it.
Relevant code, to the extent it matters (though it's so basic and obvious that I doubt a simple code fix will be the answer here):
from my webpack.base.js:
{
test: /\.(pdf)$/,
loader: 'url-loader'
},
from my vuex store, in state.js
import cvURL from './assets/pdf/gowdercv.pdf';
from the component containing the link that points to PDF:
<p><a :href="cvURL" download="gowdercv.pdf"><img src="../../assets/icons/file-pdf.svg" class="cvicon"> Download in PDF</a></p>
which is loaded as a computed property to the component, i.e.,
computed: {
cvURL: function(){return this.$store.state.cvURL;},
Does anyone know how to get functionality back in iOS? Is there a workaround built in recent versions of webpack or vue for this? Thanks!
Update: after some help off SO, an acquaintance turned up this similar problem, which also came up with a solution: turning the base64 URI into a blob and passing that data url. Which also solves my problem. Though that SO doesn't have an accepted answer, so I can't vote to close my own question as a duplicate, alas.

Open a link in web browser using flash swf

I am new to flash coding and didn't know much more.
I want to make a flash file that send URL to web browser to open particular link.
I've made such file it execute properly but after making swf file, it does not open the link.
Any one help me regarding this small problem.
Check out navigateToURL(): http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#navigateToURL()
Note that it won't work unless it's triggered by a user action; i.e. a mouse click or a key press

Embedded Youtube videos not appearing in infowindows

I am attempting to embed Youtube videos into some of the infowindows in the following KML file:
http://www.jonangfoundation.org/files/newdef.kml .
The videos show up fine on Google Earth and KML Builder, but on this page they do not show up at all:
http://www.jonangfoundation.org/taktentest
Anyone know what could be keeping them from showing up?
Unfortunately your 'test' page does not load - Page Not Found error.
However, I think you need to set the correct MIME type for .kml files. Your newdef.kml is presented in my browser window as XML rather than downloaded as a .kml file. That might be your problem, it is hard to tell with nothing else to go on. check out this link for details about setting the right MIME
https://developers.google.com/kml/documentation/kml_tut#kml_server
Edit: I am not sure what is going on. Your KML code looks okay to me, and I see you have tried a few different approaches, none of which appear to work. I suggest you visit this SO question, as it's answer is something you could do to make it work.
Basically, you override the default behaviour when a placemark gets clicked, and allow iframes and javascript to be used in the balloon. It is the original way of getting around your problem (however I thought it was fixed in recent version of the plug-in. Maybe not?)
I believe your content is being scrubbed. See link for description and possible work around.
https://developers.google.com/earth/documentation/balloons#scrubbing

Safari URL to PDF-page workaround?

I'm trying to link from an URL to a specific page within a PDF document being viewed using the Preview.app built in Safari (using iOS on iPad2).
I know that Sarafi does not support (hopefully in the near future) the PDF parameters like for example:
www.mywebsite.com/information.pdf#page17
or
www.mywebsite.com/information.pdf#page=17
Which should result in the PDF being viewed on page 17 when opened.
But as we know Safari opens it at the first page instead.
However!
When I am displaying the PDF in Safari and I change the pagenumber (in the URL bar) into a different pagenumber, IT WORKS.
It jumps to the correct page, and I'm changing it again and again and it works flawlessly.
So I figured, alright maybe it's because the PDF needs to be loaded the first time viewing, so I preloaded the PDF in cache, but no succes.
How can I get it to work, so that it goes to the correct page when opening the PDF?
Is there a script for changing the page number after loading or is there a different solution?
You can find the PDF I'm talking about here:
http://www.michaelmaasdam.nl/mobile/new/pagina/begroting/begroting2012.pdf?page=14
Is this link being shown from a native app?
If so, you could opt to use QuickLook instead and you may have a little more control over this kind of thing from within that.

To launch/activate/run Chrome extension with a clickable webpage link?

I have always been using Safari but I pulled the plug on Safari completely a while ago, and the ability to do a lot of things with Chrome, makes me want to be able to do more.
Here is what I was wondering:
I have a lot of newly installed extensions and webapps.
I know there are extensions that can be used upon activation and other extensions that run in the background without the need for it to be activated by clicking a button of the extensions icon.
Is there a way to launch (activate) an extension in chrome with a link (URL) in a webpage. I mean is there a URL path to activating an extension.
Also,
I like the pinned tab feature, but it seems I can only do this: Pin a tab and for it to open just like that every time by adding current tabs to 'open these pages'. But if I pinned for eg. gmail.com and then I close it and later open it up again little later it won't pin it. Is using JSON with the 128 px icon and making your own web app the only way this can be achieved?
Thank you.
As far as I know: No.
What I got from reading through the Chrome-docs is, that websites can connect to activated extensions by using the Chrome API's method runtime.connect.
I know there are extensions [...] activated by clicking a button of the extensions icon
This doesn't seem to be a general feature of Chrome extensions. The Chrome-intern activation can be found at chrome://extensions/ in your browser. These settings can't be modified by websites. You may want to create a work-around by using a "second" activation-layer in your extension.
Websites can only ask the browser to install extensions by using the webstore API.
To your second question: This chrome-extension should allow you to automatically pin tabs specified by your url (haven't tried it for myself though). Maybe this can solve your problem.
I see this answer comes late but if anyone stumbles on this as I did, hopefully might find this useful. I can help you with the url of a Chrome Extension. Open the Web Inspector console and type this to get the url:
chrome.extension.getURL()

Resources