123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- /******************************************************
- * Main JavaScript file - Entry point of all JS files *
- ******************************************************/
-
- // NOTE: ServiceWorker Registration
- if ('serviceWorker' in navigator) {
- window.addEventListener('load', function () {
- // Register a service worker hosted at the root of the
- // site using the default scope ('/').
- return navigator.serviceWorker.register('/serviceWorker.js', {
- scope: '/'
- }).then(function (registration) {
- return console.log('Service worker registration succeeded: ', registration);
- }).catch(function (error) {
- return console.log('Service worker registration failed: ', error);
- });
- });
- } else {
- console.log('Service workers are not supported.');
- }
-
- // NOTE: Set Bootstrap materialdesign
- document.addEventListener("DOMContentLoaded", function () {
- $('body').bootstrapMaterialDesign();
- }, false);
- /*
- $(document).ready(function() {
- $('body').bootstrapMaterialDesign();
- });
- */
-
- /*
- // NOTE: Define routes
- const routes = [{
- path: "/home",
- component: RouterHome
- },
- {
- path: "/folder",
- component: RouterFolder
- },
- {
- path: "/bookmark",
- component: RouterBookmark
- },
- {
- path: "/profil",
- component: RouterProfil
- },
- {
- path: "/entry/:what/:id",
- component: RouterEntry
- },
- {
- path: "/entry/:what",
- component: RouterEntry
- },
- ];
- const router = new VueRouter({
- routes
- });
- */
|