Disable global context menu to prevent 'Save As'

This commit is contained in:
choibk 2026-01-19 19:50:10 +09:00
parent 67b2684f64
commit 8d95d5eb93

View File

@ -25,6 +25,17 @@ function ScrollToTopComp() {
} }
function App() { function App() {
// Global Content Protection
useEffect(() => {
const handleContextMenu = (e) => {
e.preventDefault();
};
document.addEventListener('contextmenu', handleContextMenu);
return () => {
document.removeEventListener('contextmenu', handleContextMenu);
};
}, []);
return ( return (
<Router> <Router>
<ScrollToTopComp /> <ScrollToTopComp />