Skip to content

Commit

Permalink
add custom delay for beacon waiting time
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrisrp committed May 28, 2024
1 parent 0a34f3e commit 0214637
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions assets/js/lcp-beacon.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,14 @@ class RocketLcpBeacon {
if (document.readyState !== 'loading') {
setTimeout(() => {
instance.init();
}, 500);
}, window.rocket_lcp_data.delay);
return;
}

document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
instance.init();
}, 500);
}, window.rocket_lcp_data.delay);
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/lcp-beacon.js.min.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0214637

Please sign in to comment.