Disabling right click

Hi guys, just a quick question on any ideas how we can disable right click on Ghost (Casper theme)? I’m trying to protect the content, is this a good idea? Many thanks for any thoughts!

What do you mean by “trying to protect the content”?

@fabien I mean highlighting & right click copy.

Most operating systems allow a user to use ctrl+c or cmd+c or other keyboard shortcuts to copy text, besides - when you put content on the internet, there is nothing to stop someone from taking a screenshot, or using something other than a web browser to download that content.

If you want your content to be private, I would suggest looking at our private site functionality or the members feature which will restrict access to the content at the HTTP/S level! :relaxed:


@fabien Hmm okay i agree (was a bit haunted by the last copy), thanks @fabien for your recommends! :blush:

There is no way to protect public content, that is not how it works. Anytime you publish something, it is public, and anyone can copy the text. If someone has a little bit expertise with programming, they could easily scrape all your articles within an hour. That’s just how it works, when you publish something to the internet.

1 Like

Try this out: this only disables right click / dragging, but does not prevent users from grabbing from source / keyboard shortcuts.

.noselect {
  -webkit-touch-callout: none; /* Safari Touch */
  -webkit-user-select: none;   /* Webkit */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Edge*/
   user-select: none;       /* Future-proof*/

.nodrag {
   -webkit-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
   user-drag: none;
1 Like