Hey all,

There is a nice option to show a message when right clicking on a page, like this: https://codepen.io/aakalyankar/pen/NqOwbM.
But I only want the right click disabled with message when clicking on an image, so I already have this:
Code:
<script>
document.oncontextmenu = function(e){
	var target = (typeof e !="undefined")? e.target: event.srcElement
	if (target.tagName == "IMG" || (target.tagName == 'A' && target.firstChild.tagName == 'IMG'))
		return false
}
</script>
How do I put the two together, so that only when right clicking on an image, I would get the message?
Thanks.