Changeset 3111688
- Timestamp:
- 07/03/2024 12:34:37 PM (21 months ago)
- File:
-
- 1 edited
-
exly-wp/trunk/public/js/exly-wp-public.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
exly-wp/trunk/public/js/exly-wp-public.js
r2872239 r3111688 287 287 288 288 })( jQuery ); 289 290 291 document.addEventListener("DOMContentLoaded", function() { 292 // Clear all cookies 293 document.cookie.split(";").forEach(function(c) { 294 document.cookie = c.trim().split("=")[0] + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; 295 }); 296 297 // Set the timezone cookie 298 var timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; 299 document.cookie = "system_timezone=" + timezone + "; path=/"; 300 301 // Reload the page after setting the timezone 302 if (!location.search.includes('reloaded=true')) { 303 location.href = location.href + '?reloaded=true'; 304 } else { 305 // Use history.replaceState to remove '?reloaded=true' from the URL 306 history.replaceState(null, '', location.pathname); 307 } 308 });
Note: See TracChangeset
for help on using the changeset viewer.