Created
February 9, 2015 15:07
-
-
Save kkoziarski/8b05d4da3311f9475398 to your computer and use it in GitHub Desktop.
Replace IFrame http://youtube with https://www.youtube IFrame HTTP -> HTTPS bookmarklet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#JS #bookmarkelt | |
(function($) { | |
$('iframe[src^="http://youtube"],iframe[src^="http://www.youtube"]').each(function(){ | |
var attr = $(this).attr("src"); | |
attr = attr.replace('http', 'https'); | |
$(this).attr("src", attr); | |
//var a = document.createElement("a"); | |
//a.href = attr; | |
//a.innerHTML = attr; | |
//$(this).parent().get(0).appendChild(a); | |
}); | |
})(jQuery) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function($){$('iframe[src^="http://youtube"],iframe[src^="http://www.youtube"]').each(function(){var attr=$(this).attr("src");attr=attr.replace('http','https');$(this).attr("src",attr);});})(jQuery) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment