Refactor footer scripts into default layout and enhance service worker registration with sync capabilities
This commit is contained in:
@@ -17,22 +17,3 @@
|
||||
</ul>
|
||||
<span></span>
|
||||
</footer>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.7.1.min.js"
|
||||
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="{{ "/assets/js/materialize.min.js" | relative_url }}"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var sidenavElems = document.querySelectorAll('.sidenav');
|
||||
var sidenavInstances = M.Sidenav.init(sidenavElems, {});
|
||||
});
|
||||
|
||||
document.querySelectorAll("button").forEach(button => {
|
||||
const href = button.getAttribute("data-href");
|
||||
if (!href) return;
|
||||
button.addEventListener("click", () => {
|
||||
window.location.href = button.getAttribute("data-href");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user