Google Chrome has a Google Lens option that allows to take a screenshot and then copy the text. My website has multiple ways setups to discourage users to take screenshots like showing an alert when pressing the screenshot button:
window.addEventListener('keyup', function(e) {
if (e.keyCode === 44) { // Detect Print Screen
This does not work when using the Google Lens function of Chrome. Is there a way to detect the use of Chrome Google Lens through JavaScript or any other way? I understand its not possible to make screenshots impossible, but I want to discourage the user from taking screenshots. Having an inbuilt Chrome function that lets users bypass it is unfortunate.
document.addEventListener('visibilitychange', function() {
Does not work
Big Boy Mike is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.