YouTube Video Download

By rossy! Last update Jan 10, 2013 — Installed 1,252,489 times.

Don't break secure connection when updating

in
Subscribe to Don't break secure connection when updating 1 post, 1 voice

SBscripts Scriptwright
FirefoxWindows

Hi,

When the updater is run, Firefox / Opera show encrypted connection as broken when browsing via https://www.youtube.com, Chrome shows an insecure content warning.

Wouldn't it be great to take advantage of the https:// connection USO offers and prevent these annoyances?

The fix is pretty easy:

1. Add an extra @include
// @updateURL      https://userscripts.org/scripts/source/62634.meta.js
// @include        http://userscripts.org/scripts/source/62634.meta.js
// @include        https://userscripts.org/scripts/source/62634.meta.js
// @include        http://*.youtube.com/watch?*

2. In the checkForUpdates() function, change one line as follows:
document.body.appendChild(createElem("iframe", {
	src: ((document.location.protocol==="https:")?"https":"http")+"://userscripts.org/scripts/source/62634.meta.js",
	style: {

3. Replace the third-last line of the file by this:
else if (document.location.href == "http://userscripts.org/scripts/source/62634.meta.js"||document.location.href == "https://userscripts.org/scripts/source/62634.meta.js") inject(function() {

Thanks in advance.

PS, the lines in bold are changed / added.
PPS, anyone desperate for an update ;-): you can download this fix here.