ar.falsy.cat/js/router.d6fe6bd821db9ea97f9aeefae814d8e7.min.js

1 line
358 B
JavaScript
Raw Normal View History

import{apply,navigate,prefetch,router,}from"https://unpkg.com/million@1.11.5/dist/router.mjs";export const attachSPARouting=(e,n)=>{window.Million={apply,navigate,prefetch,router};const t=()=>requestAnimationFrame(n);window.addEventListener("DOMContentLoaded",()=>{apply(t=>e(t)),e(),router(".singlePage"),t()}),window.addEventListener("million:navigate",t)}