http => https check

This commit is contained in:
Jiiks 2016-03-29 02:39:27 +03:00
parent bd1274cf92
commit 066a8789e9
1 changed files with 2 additions and 1 deletions

View File

@ -3,10 +3,11 @@
var videoSupport = function () {};
videoSupport.prototype.convert = function () {
$(".message-group a").each(function() {
$(".message-group a").each(function() {
var t = $(this);
var href = t.attr("href");
if(href == undefined) return true;
href = href.replace("http", "https");
if(!href.endsWith(".mp4") && !href.endsWith(".webm") && !href.endsWith(".ogg")) return true;
var type = "webm";
if(href.endsWith(".mp4")) type = "mp4";