JS CSS

HOW TO DISABLE COPY TEXT IN CSS JAVASCRIPT

document.addEventListener("contextmenu", (evt) => {   PREVENT MENU OPEN   evt.preventDefault(); }, false);

DISABLE RIGHT CLICK

01

document.addEventListener("copy", (evt) => {   CHANGE CLIPBORD CONTENT   evt.clipboardData.setData   ("text/plain", "No Copying!");     PREVENT CLIPBOARD COPY   evt.preventDefault(); }, false);

DISABLE CLIPBOARD COPY

02

NO TEXT HIGHLIGHTING * { user-select: none; } *::selection { background: none; } *::-moz-selection { background: none; }

CSS DISABLE COPYING

03