diff options
| author | Joel Klinghed <the_jk@opera.com> | 2024-12-18 11:57:44 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@opera.com> | 2024-12-18 11:57:44 +0100 |
| commit | da52d5755e3fd616511efd084b01ed5a1f0bb61a (patch) | |
| tree | 146953620ddcde0c9c796b3c21d9c7c3f54b24bc | |
| parent | ead1f80eaf2e944e8cf0747fa4a63b9a254cd3c7 (diff) | |
clicks: Automatically disable if inside iframe
We don't want display to trigger clicks to be recored
| -rw-r--r-- | src/clicks.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/clicks.ts b/src/clicks.ts index 6d35dbb..620d845 100644 --- a/src/clicks.ts +++ b/src/clicks.ts @@ -51,6 +51,7 @@ class Session { function startSession(data: string): Session | undefined { if (CLICKS_WSURL === undefined) return undefined + if (window.self !== window.top) return undefined const session = new Session(CLICKS_WSURL, data) void session.connect() return session |
