mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
It's not obvious how the code that includes JS Modules in the frontend build works. This adds lots of comments to explain the various bits and flattens `modules/all.mjs` to just be a single function that starts off the window.GOVUK namespace. Also removes `module/all.js` from the repo'. It's an artefact used by the frontend build so shouldn't be included as source code.
18 lines
456 B
JavaScript
18 lines
456 B
JavaScript
window.GOVUK.Frontend.initAll();
|
|
|
|
$(() => GOVUK.addCookieMessage());
|
|
|
|
$(() => $("time.timeago").timeago());
|
|
|
|
$(() => GOVUK.stickAtTopWhenScrolling.init());
|
|
$(() => GOVUK.stickAtBottomWhenScrolling.init());
|
|
|
|
var showHideContent = new GOVUK.ShowHideContent();
|
|
showHideContent.init();
|
|
|
|
$(() => GOVUK.modules.start());
|
|
|
|
$(() => $('.error-message').eq(0).parent('label').next('input').trigger('focus'));
|
|
|
|
$(() => $('.banner-dangerous').eq(0).trigger('focus'));
|