Skip to content

Commit

Permalink
Compile JS
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Oct 22, 2024
1 parent d17c844 commit a7b7e6c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/resources/js/blitzInjectScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
window.addEventListener('{injectScriptEvent}', injectElements, { once: true });
const injectScriptEvent = '{injectScriptEvent}';
if (injectScriptEvent === 'load') {
window.addEventListener('load', injectElements, { once: true });
}
else {
document.addEventListener(injectScriptEvent, injectElements, { once: true });
}
function injectElements() {
return __awaiter(this, void 0, void 0, function* () {
if (!document.dispatchEvent(new CustomEvent('beforeBlitzInjectAll', {
Expand Down

0 comments on commit a7b7e6c

Please sign in to comment.