mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-17 21:15:47 +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(){
|
$(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