From c511eed55cc11923b2e13472a4aa9cf7ad30e417 Mon Sep 17 00:00:00 2001 From: Paul Moeller Date: Thu, 19 Sep 2024 17:58:19 -0600 Subject: [PATCH] fix #7243 ignore cookieconsent cookie changes (#7268) --- sirepo/package_data/static/js/sirepo-common.js | 3 ++- sirepo/package_data/static/js/sirepo.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sirepo/package_data/static/js/sirepo-common.js b/sirepo/package_data/static/js/sirepo-common.js index 903a64a96a..e08bd7800d 100644 --- a/sirepo/package_data/static/js/sirepo-common.js +++ b/sirepo/package_data/static/js/sirepo-common.js @@ -1,6 +1,7 @@ 'use strict'; // Common code shared between the landing page app and the various sirepo apps +SIREPO.cookieConsentName = 'sr_cookieconsent'; window.cookieconsent.initialise({ //TODO(pjm): set cookie domain? @@ -11,7 +12,7 @@ window.cookieconsent.initialise({ link: null, }, cookie: { - name: 'sr_cookieconsent', + name: SIREPO.cookieConsentName, }, palette: { popup: { diff --git a/sirepo/package_data/static/js/sirepo.js b/sirepo/package_data/static/js/sirepo.js index f02914ccf6..09626d9290 100644 --- a/sirepo/package_data/static/js/sirepo.js +++ b/sirepo/package_data/static/js/sirepo.js @@ -2751,7 +2751,7 @@ SIREPO.app.factory('msgRouter', ($http, $interval, $q, $window, errorService, ur const c = cookiesSorted; _saveCookies(); // first time is null, and reordering is ok - if (c === null || c === cookiesSorted) { + if (c === null || c === cookiesSorted.replace(`; ${SIREPO.cookieConsentName}=dismiss`, '')) { return false; } srlog("cookies changed via another browser tab, reloading application");