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:
parent
aebe82e3a7
commit
b1ef00746f
@ -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"));
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user