功能:避免移动端缩放

pull/2045/head
ChenX 2 years ago
parent 71f283d802
commit c27029f914

@ -31,6 +31,18 @@ document.addEventListener("selectionchange", () =>
}
});
//避免在移动端被缩放
window.addEventListener('touchmove', ev =>
{
let weShouldStopDefaultScrollAndZoom = true;
if (weShouldStopDefaultScrollAndZoom)
{
ev.preventDefault();
ev.stopImmediatePropagation();
};
}, { passive: false });
document.body.className = " light-golden";
//禁止右键
document.oncontextmenu = () => false;

Loading…
Cancel
Save