123456789101112131415161718192021222324252627282930 |
- /******************************************************
- * 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('[ServiceWorker] Registration succeeded: ', registration);
- }).catch(function (error) {
- return console.log('[Service worker] Registration failed: ', error);
- });
- });
- } else {
- console.log('[ServiceWorker] are not supported.');
- }
-
- // NOTE: Set Bootstrap materialdesign
- document.addEventListener("DOMContentLoaded", function () {
- $('body').bootstrapMaterialDesign();
- }, false);
- /*
- $(document).ready(function() {
- $('body').bootstrapMaterialDesign();
- });
- */
|