1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-14 03:15:49 +02:00

Hide open/copy link context menu items for media previews

This commit is contained in:
chylex 2017-07-21 11:07:40 +02:00
parent aebe82e3a7
commit b1ef00746f

View File

@ -330,7 +330,14 @@
});
$(document.body).delegate("a.js-media-image-link", "contextmenu", function(){
$TD.setLastRightClickedImage($(this)[0].style.backgroundImage.replace(/url\(['"]?(.*?)['"]?\)/, "$1"));
let me = $(this)[0];
if (me.firstElementChild){
$TD.setLastRightClickedImage(me.firstElementChild.getAttribute("src"));
}
else{
$TD.setLastRightClickedImage(me.style.backgroundImage.replace(/url\(['"]?(.*?)['"]?\)/, "$1"));
}
});
//