3 ms·
Oh shit, you disabled right click? And a rather modern approach for doing it: <script> export default { mounted() { document.addEventListener("c
by divbzero 5y ago
Oh shit, you disabled right click?
And a rather modern approach for doing it:
<script>
export default {
mounted() {
document.addEventListener("contextmenu", event => {
event.preventDefault()
alert("Right click is disabled!!!")
})
}
}
</script>
https://github.com/SaraVieira/make-frontend-shit-again/blob/8a038ecc2a25814c843e45d38576d6da6dbbdce9/layouts/default.vue#L7-L16 https://github.com/SaraVieira/make-frontend-shit-again/blob/...
- Accacin 5y agoMaybe you know, but it might help someone else. Hold shift when right clicking and it works :D
- divbzero 5y agoInteresting, I did not know about shift + right click. It appears to be a browser feature in Firefox to avoid abuse of the contextmenu event. The same trick did not work in Chrome or Safari.