Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CCAP-314] Optimize scripts and move them to footer #799

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/main/resources/templates/fragments/doc-upload-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title th:text="${errorMessages == null ? title : #messages.msg('errors.general-title')}"></title>
<script src="/webjars/form-flow/0.0.1/js/honeycrisp.min.js"></script>
<script>
(function (h, o, u, n, d) {
h = h[d] = h[d] || {
Expand All @@ -24,20 +25,16 @@
service: 'il-gcc-front-end',
env: '[[${@environment.getProperty("DATADOG_ENVIRONMENT")}]]',
sessionSampleRate: 100,
sessionReplaySampleRate: '[[${@environment.getProperty("DATADOG_SESSION_REPLAY_SAMPLE_RATE")}]]',
sessionReplaySampleRate: [[${@environment.getProperty("DATADOG_SESSION_REPLAY_SAMPLE_RATE")}]],

Check notice

Code scanning / CodeQL

Syntax error Note

Error: Unexpected token
trackUserInteractions: true,
trackResources: true,
trackLongTasks: true,
defaultPrivacyLevel: 'mask-user-input',
});
})
</script>
<script src="/webjars/form-flow/0.0.1/js/honeycrisp.min.js"></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowDropZone.js"></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowLanguageSelector.js" defer></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowDisableMultipleFormSubmit.js" defer></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowFollowUpQuestion.js" defer></script>
<th:block th:replace="~{fragments/mixpanelTracking :: mixpanelTracking}"></th:block>
<script src="/webjars/form-flow/0.0.1/js/formFlowDropZone.js"></script>
<link href="/webjars/form-flow/0.0.1/css/honeycrisp.min.css" rel="stylesheet"/>
<link href="/webjars/form-flow/0.0.1/css/libraryStyles.css" rel="stylesheet"/>
<link href="/webjars/form-flow/0.0.1/css/customDropzone.css" rel="stylesheet"/>
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/templates/fragments/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
</div>
</div>
</div>
<script src="/webjars/form-flow/0.0.1/js/formFlowLanguageSelector.js" defer></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowDisableMultipleFormSubmit.js" defer></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowFollowUpQuestion.js" defer></script>
</footer>
5 changes: 1 addition & 4 deletions src/main/resources/templates/fragments/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title th:text="${errorMessages == null ? title : #messages.msg('errors.general-title')}"></title>
<script src="/webjars/form-flow/0.0.1/js/honeycrisp.min.js"></script>
<script>
(function (h, o, u, n, d) {
h = h[d] = h[d] || {
Expand Down Expand Up @@ -32,10 +33,6 @@
});
})
</script>
<script src="/webjars/form-flow/0.0.1/js/honeycrisp.min.js"></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowLanguageSelector.js" defer></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowDisableMultipleFormSubmit.js" defer></script>
<script src="/webjars/form-flow/0.0.1/js/formFlowFollowUpQuestion.js" defer></script>
<th:block th:replace="~{fragments/mixpanelTracking :: mixpanelTracking}"></th:block>
<link href="/webjars/form-flow/0.0.1/css/honeycrisp.min.css" rel="stylesheet"/>
<link href="/webjars/form-flow/0.0.1/css/libraryStyles.css" rel="stylesheet"/>
Expand Down