MDL-79041 core: Fix typo for MoodleNet resource URL
[moodle.git] / lib / amd / build / sticky-footer.min.js
blob287bab9040d703aef49226eb0fe36d489ac49c99
1 define("core/sticky-footer",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.registerManager=_exports.init=_exports.enableStickyFooter=_exports.disableStickyFooter=void 0;
2 /**
3    * Sticky footer wrapper module.
4    *
5    * Themes are responsible for implementing the sticky footer. However,
6    * modules can interact with the sticky footer using this module.
7    *
8    * @module     core/sticky-footer
9    * @copyright  2023 Ferran Recio <ferran@moodle.com>
10    * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
11    */
12 let manager={},enabled=!1,initialized=!1;const SELECTORS_STICKYFOOTER=".stickyfooter",CLASSES_INVISIBLE="v-hidden",enableStickyFooter=()=>{var _document$querySelect;(enabled=!0,void 0!==manager.enableStickyFooter)?manager.enableStickyFooter():null===(_document$querySelect=document.querySelector(SELECTORS_STICKYFOOTER))||void 0===_document$querySelect||_document$querySelect.classList.remove(CLASSES_INVISIBLE)};_exports.enableStickyFooter=enableStickyFooter;const disableStickyFooter=()=>{var _document$querySelect2;(enabled=!1,void 0!==manager.disableStickyFooter)?manager.disableStickyFooter():null===(_document$querySelect2=document.querySelector(SELECTORS_STICKYFOOTER))||void 0===_document$querySelect2||_document$querySelect2.classList.add(CLASSES_INVISIBLE)};_exports.disableStickyFooter=disableStickyFooter;_exports.registerManager=themeManager=>{manager=themeManager,enabled&&enableStickyFooter()};_exports.init=()=>{var _document$querySelect3;if(initialized)return;initialized=!0;(null===(_document$querySelect3=document.querySelector(SELECTORS_STICKYFOOTER))||void 0===_document$querySelect3?void 0:_document$querySelect3.dataset.disable)?disableStickyFooter():enableStickyFooter()}}));
14 //# sourceMappingURL=sticky-footer.min.js.map