om/public/main.js

64 lines
1.4 KiB
JavaScript
Raw Normal View History

/******************************************************
* 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
});
*/