1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-22 09:15:48 +02:00

Open browser when clicking on a "gif" (actually mp4)

This commit is contained in:
chylex 2016-04-15 23:24:21 +02:00
parent 9e5a39e9fc
commit ee87841ec2

View File

@ -230,4 +230,16 @@
onUrlOpened();
};
})();
//
// Block: Hook into mp4 video element clicking
//
$(document.body).delegate("video.js-media-gif","click",function(e){
var src = $(this).attr("src");
if (src.endsWith(".mp4")){
$TD.openBrowser(src);
e.preventDefault();
}
});
})($,$TD);