Skip to content

Commit

Permalink
Moved DisableContextMenu(); call to ListenForWaterfallContent
Browse files Browse the repository at this point in the history
  • Loading branch information
johanbenschop committed Nov 20, 2023
1 parent 3e57404 commit 1d8154e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions 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 @@ -73,7 +73,6 @@
try {
await connection.start();
console.log('SignalR Connected.');
DisableContextMenu();
} catch (err) {
console.log(err);
setTimeout(start, 5000);
Expand All @@ -84,10 +83,6 @@
});
}

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

function RemoveActivePanel() {
if (document.querySelector('.active_panel')) {
// remove the active panel
Expand Down Expand Up @@ -604,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 @@ -1021,6 +1020,8 @@
});
window.Masonry.resizeAllGridItems();
});

DisableContextMenu();
},

ListenForModerationContent: async function (tag) {
Expand Down

0 comments on commit 1d8154e

Please sign in to comment.