1-打开浏览器,右键添加网页
3- 输入名称,在网址中输入代码后保存。
javascript:!function () {
function t(e) {
e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation()
}
document.querySelectorAll("*").forEach(e => {
"none" === window.getComputedStyle(e, null).getPropertyValue("user-select") && e.style.setProperty("user-select", "text", "important")
}), ["copy", "cut", "contextmenu", "selectstart", "mousedown", "mouseup", "mousemove", "keydown", "keypress", "keyup"].forEach(function (e) {
document.documentElement.addEventListener(e, t, {capture: !0})
}), alert("解除限制成功啦!")
}();
测试浏览器:谷歌浏览器(其他浏览器自行测试)
测试网页:https://www.ahhhhfs.com/19254/
测试结果: