Skip to content

Commit 566043a

Browse files
committed
docs: disable search blur in non-prod env
1 parent 5c5a72e commit 566043a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: docs/javascript/extra.js

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const awsconfig = {
1010
};
1111

1212
const RUNTIME = "python"
13+
const BASE_ORIGIN = "awslabs.github.io"
1314

1415
function copyToClipboard(e) {
1516
e.preventDefault()
@@ -18,6 +19,7 @@ function copyToClipboard(e) {
1819
}
1920

2021
function enableSearchOnBlurElement() {
22+
if (document.location.hostname != BASE_ORIGIN) return // prevent unnecessary data
2123
/* Register handler to log search on blur */
2224
document.addEventListener("DOMContentLoaded", function () {
2325
recordPageView({

0 commit comments

Comments
 (0)