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 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /******************************************************
  2. * Main JavaScript file - Entry point of all JS files *
  3. ******************************************************/
  4. // NOTE: ServiceWorker Registration
  5. if ('serviceWorker' in navigator) {
  6. window.addEventListener('load', function () {
  7. // Register a service worker hosted at the root of the
  8. // site using the default scope ('/').
  9. return navigator.serviceWorker.register('/serviceWorker.js', {
  10. scope: '/'
  11. }).then(function (registration) {
  12. return console.log('Service worker registration succeeded: ', registration);
  13. }).catch(function (error) {
  14. return console.log('Service worker registration failed: ', error);
  15. });
  16. });
  17. } else {
  18. console.log('Service workers are not supported.');
  19. }
  20. // NOTE: Set Bootstrap materialdesign
  21. document.addEventListener("DOMContentLoaded", function () {
  22. $('body').bootstrapMaterialDesign();
  23. }, false);
  24. /*
  25. $(document).ready(function() {
  26. $('body').bootstrapMaterialDesign();
  27. });
  28. */
  29. /*
  30. // NOTE: Define routes
  31. const routes = [{
  32. path: "/home",
  33. component: RouterHome
  34. },
  35. {
  36. path: "/folder",
  37. component: RouterFolder
  38. },
  39. {
  40. path: "/bookmark",
  41. component: RouterBookmark
  42. },
  43. {
  44. path: "/profil",
  45. component: RouterProfil
  46. },
  47. {
  48. path: "/entry/:what/:id",
  49. component: RouterEntry
  50. },
  51. {
  52. path: "/entry/:what",
  53. component: RouterEntry
  54. },
  55. ];
  56. const router = new VueRouter({
  57. routes
  58. });
  59. */