diff --git a/config/plugins/webhooks/gtn/script.js b/config/plugins/webhooks/gtn/script.js index d9310df39b9..77f1b1e9f5a 100644 --- a/config/plugins/webhooks/gtn/script.js +++ b/config/plugins/webhooks/gtn/script.js @@ -3,7 +3,10 @@ var lastUpdate = 0; function removeOverlay() { - document.getElementById("gtn-container").style.visibility = "hidden"; + const container = document.getElementById("gtn-container"); + if (container) { + container.style.visibility = "hidden"; + } } function showOverlay() { diff --git a/config/plugins/webhooks/news/script.js b/config/plugins/webhooks/news/script.js index 93cff81017b..688de22d74e 100644 --- a/config/plugins/webhooks/news/script.js +++ b/config/plugins/webhooks/news/script.js @@ -1,6 +1,9 @@ (function () { function hideNewsOverlay() { - document.getElementById("news-container").style.visibility = "hidden"; + const container = document.getElementById("news-container"); + if (container) { + container.style.visibility = "hidden"; + } } function newsSeen() {