📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fix: broken session replays for dark themed websites
Blue Mouse5d2b930d0994
diff --git a/backend/scripts/patch-rrvideo.js b/backend/scripts/patch-rrvideo.jsindex 1c90a512d..25e73c606 100644--- a/backend/scripts/patch-rrvideo.js+++ b/backend/scripts/patch-rrvideo.js@@ -119,11 +119,9 @@ if (blockStart === -1 || blockEnd === -1) {const blockReplacement = [' const userConfig = ${JSON.stringify((config === null || config === void 0 ? void 0 : config.rrwebPlayer) || {})};',' try {',- ' const insertStyleRules = Array.isArray(userConfig.insertStyleRules) ? userConfig.insertStyleRules : [];',' window.replayer = new rrwebReplay.Replayer(events, {',' ...userConfig,',' root: document.body,',- ' insertStyleRules: [...insertStyleRules, \'html, body { background-color: #fff; }\'],',' });',' const resizeWrapper = () => {'," const wrapper = document.querySelector('.replayer-wrapper');",diff --git a/web/app/pages/Project/tabs/Sessions/SessionReplayModal.tsx b/web/app/pages/Project/tabs/Sessions/SessionReplayModal.tsxindex b2f2a0a94..e8b2ad7c6 100644--- a/web/app/pages/Project/tabs/Sessions/SessionReplayModal.tsx+++ b/web/app/pages/Project/tabs/Sessions/SessionReplayModal.tsx@@ -1328,7 +1328,6 @@ const SessionReplayModal = ({speed: speedRef.current,skipInactive: skipInactiveRef.current,inactivePeriodThreshold: INACTIVE_SKIP_THRESHOLD_MS,- insertStyleRules: ['html, body { background-color: #fff; }'],})instance.on(FULLSNAPSHOT_REBUILDED_EVENT, markPlayerReady)replayer.current = instance@@ -1376,7 +1375,6 @@ const SessionReplayModal = ({root,speed: 1,mouseTail: false,- insertStyleRules: ['html, body { background-color: #fff; }'],showWarning: false,})} catch {