Codeinwp / Nivo-Lightbox-jQuery

A simple, flexible, responsive, retina-ready jQuery lightbox plugin.
http://dev7studios.com/nivo-lightbox
MIT License
157 stars 87 forks source link

YouTube HTTPS issue #61

Open gilbitron opened 8 years ago

gilbitron commented 8 years ago

I thought I'd mention a minor glitch I found in your javascript. I bought a site with your js in it, which lead me here.

nivo-lightbox.min.js

You had:

... if(o[1]=="youtu"){a="http://www.youtube.com/embed ...

this section of code converts the short link into an embed link. While this works, it has a minor issue of ONLY working on http sites, as the protocall is hard coded.

Changing it to:

if(o[1]=="youtu"){a="https://www.youtube.com/embed

allows it to work on both http and https sites, as https content loads correctly over http, however the inverse is not true on all browsers.

There are two instances of the issue in your javascript.

deidyomega commented 8 years ago

Looks like there is already a pull request for this:

https://github.com/gilbitron/Nivo-Lightbox/pull/58/commits/752fc562142fb7661b4817523fd2275e9e39de12

LukeTowers commented 8 years ago

Yeah, I submitted that pull request a while ago. Is there anything I have to do on my end to push it through?

LukeTowers commented 8 years ago

Although, I might have to submit it again, the fix wasn't included in the minified version of the JS.

alejo-jm commented 8 years ago

hello the error with this is on the lines (197,201,205) "nivo-lightbox.js", this line have burned:
http://www. should be //www.
for keep the https or http on site working

LukeTowers commented 8 years ago

Yes, that is what the pull request changes.

tmugford commented 7 years ago

This fix was merged in PR https://github.com/Codeinwp/Nivo-Lightbox-jQuery/pull/58.