refactor: enhance public API for replay control with backward compatibility for Ciphera and branding update to Pulse
This commit is contained in:
@@ -495,8 +495,8 @@
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * Public API for replay control
|
// * Public API for replay control (ciphera for backward compat, pulse for Pulse branding)
|
||||||
window.ciphera = window.ciphera || function(cmd) {
|
const replayApi = function(cmd) {
|
||||||
if (cmd === 'disableReplay') {
|
if (cmd === 'disableReplay') {
|
||||||
endReplaySession();
|
endReplaySession();
|
||||||
} else if (cmd === 'getReplayMode') {
|
} else if (cmd === 'getReplayMode') {
|
||||||
@@ -505,6 +505,8 @@
|
|||||||
return replayEnabled;
|
return replayEnabled;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
window.pulse = window.pulse || replayApi;
|
||||||
|
window.ciphera = window.ciphera || replayApi;
|
||||||
|
|
||||||
// * Track initial pageview
|
// * Track initial pageview
|
||||||
trackPageview();
|
trackPageview();
|
||||||
|
|||||||
Reference in New Issue
Block a user