Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.js 843B

1234567891011121314151617181920212223242526
  1. /******************************************************
  2. * Main JavaScript file - Entry point of all JS files *
  3. ******************************************************/
  4. // Wait until page loaded
  5. window.addEventListener('load', () => {
  6. if ('serviceWorker' in navigator) {
  7. // NOTE: ServiceWorker Registration
  8. return navigator.serviceWorker.register('serviceWorker.js', {
  9. scope: '/'
  10. }).then(function (registration) {
  11. return console.log('[ServiceWorker] Registration succeeded: ', registration);
  12. }).catch(function (error) {
  13. return console.log('[Service worker] Registration failed: ', error);
  14. });
  15. } else {
  16. console.log('[ServiceWorker] are not supported.');
  17. return;
  18. }
  19. });
  20. // NOTE: Set Bootstrap materialdesign
  21. document.addEventListener("DOMContentLoaded", function () {
  22. $('body').bootstrapMaterialDesign();
  23. }, false);