How is this done? (can't select text, can't right-click..)

www.laderasur.cl/esta-pasando/bases-3er-concurso-de-fotografia-ladera-sur-agua-2017-todos-a-participar/

can’t select text, can’t right-click…
I managed to copy email address (in paragr 8) by getting dev tools from Chrome menu… and got code for email address from there… however, when you view src code (all code for the page appears on a new tab in Chrome) the email address appears thus:

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="11727e7f726463627e7d707574637062646351767c70787d3f727e7c">[email&#160;protected]</a>
why would anyone do this? the email address is not a link, & you can’t copy it… when in fact you’re supposed to send something to this email address (it’s rules for a photo contest…)

and: how do you do this, prevent users from selecting text, not getting a menu when right-click… very annoying… that someone would go to the trouble to do this… just wondering…

thank you…

It’s done with Javascript. Just turn off Javascript.

yes but HOW?? am just curious…

thank you…

You should be able to see the JS, or a link to the JS if you view the source.

In Chrome, it’s under the advanced section of the settings I think. You can turn it off there.

It’s done with JavaScript.

something like:

document.addEventListener('contextmenu', event => event.preventDefault());

will prevent people from being able to bring up the “right click menu” on your website. It used to be used to stop people from right clicking on your images and saving them - photographers and artists used it… But that became pointless once people realised they could just save a screenshot of your page instead and use their own photo editing software to crop the image they wanted. Nowadays - it’s a totally useless exercise and just annoys visitors.

2 Likes

oh… I do no know how turn off JS in Chrome (I actually have a neat plugin for that…:wink:

I just wanted mainly to know how they did it…

thank you…

ok… thank you…

(even more annoying is you also can’t select text (I don’t know if that’s done with the same line of code you mention…)

thank you…

(it’s true what you mention about saving images and screenshots… of course it’s moot, like you mention…:wink:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.