Skip to content

Commit

Permalink
feat: Add DisableContextMenu function (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanbenschop committed Nov 20, 2023
1 parent 9f981c5 commit 929c1bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/TagzApp.Web/wwwroot/js/site.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function () {
(function () {
var connection;

const ModerationState = {
Expand Down Expand Up @@ -599,6 +599,10 @@
});
}

function DisableContextMenu() {
document.addEventListener('contextmenu', ev => ev.preventDefault());
}

function FormatPauseButton() {
if (paused) {
pauseButton.classList.remove('bi-pause-circle-fill');
Expand Down Expand Up @@ -1016,6 +1020,8 @@
});
window.Masonry.resizeAllGridItems();
});

DisableContextMenu();
},

ListenForModerationContent: async function (tag) {
Expand Down

0 comments on commit 929c1bd

Please sign in to comment.