Skip to content

Instantly share code, notes, and snippets.

@oflow
Last active November 20, 2018 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oflow/11cfedc3f1b044a7ab421d209c24d8bd to your computer and use it in GitHub Desktop.
Save oflow/11cfedc3f1b044a7ab421d209c24d8bd to your computer and use it in GitHub Desktop.
貼り付けと選択と右クリック禁止すんな殺すぞ!
// ==UserScript==
// @name Disable "disable Paste, Contextmenu, Select"
// @description 貼り付けと選択と右クリック禁止すんな殺すぞ!
// @namespace https://oflow.me
// @include https://*
// @include http://*
// @version 1.0.2
// @grant none
// ==/UserScript==
document.addEventListener("paste", (e) => e.stopImmediatePropagation(), true);
document.addEventListener("contextmenu", (e) => e.stopImmediatePropagation(), true);
document.addEventListener("selectstart", (e) => e.stopImmediatePropagation(), true);
var b = document.querySelector("body");
b.removeAttribute("onmousedown");
b.removeAttribute("onselectstart");
b.removeAttribute("oncontextmenu");
var s = document.createElement("style");
s.createTextNode("img { pointer-events: auto !important; }");
document.querySelector("head").appendChild(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment