Skip to content

Instantly share code, notes, and snippets.

@gonaumov
Created February 9, 2020 12:26
Show Gist options
  • Save gonaumov/e1d252dd1543e2988cb05aee344d887b to your computer and use it in GitHub Desktop.
Save gonaumov/e1d252dd1543e2988cb05aee344d887b to your computer and use it in GitHub Desktop.
(function() {
var css = ["* {",
"-webkit-touch-callout: default !important;",
"-webkit-user-select: auto !important;",
"-khtml-user-select: auto !important;",
"-moz-user-select: auto !important;",
"-ms-user-select: auto !important;",
"user-select: auto !important;",
"cursor: auto !important;",
"-webkit-tap-highlight-color: black !important;",
"}"].join("\n");
var head = document.head || document.getElementsByTagName("head")[0];
var style = document.createElement("style");
head.appendChild(style);
style.type = "text/css";
style.appendChild(document.createTextNode(css));
if (typeof document.body.style.MozUserSelect != "undefined") {
document.body.style.MozUserSelect = "auto";
}
document.body.style.cursor = "default";
document.ondragstart = function () {}
document.oncontextmenu = function () {}
document.onkeydown = function () {}
document.onselectstart = function () {}
document.body.ondragstart = function () {}
document.body.oncontextmenu = function () {}
document.body.onkeydown = function () {}
document.body.onselectstart = function () {}
document.body.ondragstart = function () {}
document.onmousedown = function () {}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment