Public: disable context menu and drag on images

This commit is contained in:
Alex Assistant 2026-02-20 15:28:29 +03:00
parent f76c869a97
commit c29eaa897b

View File

@ -196,5 +196,13 @@ function outputWatermarked(string $path, string $mime): never
<small class="footer-author">by <a href="https://t.me/andr33vru" target="_blank" rel="noopener noreferrer">andr33vru</a></small>
</footer>
</div>
<script>
(() => {
document.querySelectorAll('img').forEach((img) => {
img.addEventListener('contextmenu', (e) => e.preventDefault());
img.addEventListener('dragstart', (e) => e.preventDefault());
});
})();
</script>
</body>
</html>