From 0be6d33b345959f11f9029f4c7c44546c69cde21 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 30 Dec 2021 10:37:03 +0100 Subject: [PATCH] Add support for banner expiration --- assets/js/components/menuBar/banner.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/js/components/menuBar/banner.js b/assets/js/components/menuBar/banner.js index b875005c..30e39dd4 100644 --- a/assets/js/components/menuBar/banner.js +++ b/assets/js/components/menuBar/banner.js @@ -66,6 +66,9 @@ const MenubarBanner = { link.target = "_blank"; } + if(banner.expire) + setTimeout(() => rootEl.remove(), (banner.expire - ComunicDate.time()) * 1000) + return rootEl; } }; \ No newline at end of file