Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ellite committed Feb 22, 2024
1 parent 6889ea2 commit 63fc763
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 182 deletions.
2 changes: 1 addition & 1 deletion includes/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="styles/styles.css?<?= $version ?>">
<link rel="stylesheet" href="styles/dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/font.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Barlow:300,400,500,600,700">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<script type="text/javascript" src="scripts/all.js?<?= $version ?>"></script>
<script type="text/javascript" src="scripts/common.js?<?= $version ?>"></script>
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "Wallos",
"name": "Wallos - Personal Subscription Tracker",
"name": "Wallos - Subscription Tracker",
"icons": [
{
"src": "images/icon/android-chrome-192x192.png",
Expand Down
1 change: 1 addition & 0 deletions registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function validate($value) {
<link rel="manifest" href="manifes.json">
<link rel="stylesheet" href="styles/login.css?<?= $version ?>">
<link rel="stylesheet" href="styles/login-dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Barlow:300,400,500,600,700">
<script type="text/javascript" src="scripts/registration.js?<?= $version ?>"></script>
<script type="text/javascript" src="scripts/all.js?<?= $version ?>"></script>
</head>
Expand Down
14 changes: 7 additions & 7 deletions scripts/all.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('scripts/service-worker.js').then(function(registration) {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
console.log('ServiceWorker registration failed: ', err);
});
window.addEventListener('load', function() {
navigator.serviceWorker.register('service-worker.js').then(function(registration) {
//console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
console.log('ServiceWorker registration failed: ', err);
});
}
});
}
44 changes: 0 additions & 44 deletions scripts/service-worker.js

This file was deleted.

44 changes: 44 additions & 0 deletions service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open('my-cache').then(function(cache) {
return cache.addAll([
'.',
'index.php',
'stats.php',
'settings.php',
'about.php',
'endpoints/subscriptions/get.php',
'styles/styles.css',
'styles/dark-theme.css',
'styles/login.css',
'scripts/common.js',
'scripts/dashboard.js',
'scripts/stats.js',
'scripts/settings.js',
'scripts/registration.js',
'scripts/i18n/en.js',
'scripts/i18n/de.js',
'scripts/i18n/el.js',
'scripts/i18n/es.js',
'scripts/i18n/fr.js',
'scripts/i18n/jp.js',
'scripts/i18n/pt.js',
'scripts/i18n/tr.js',
'scripts/i18n/zh_cn.js',
'scripts/i18n/zh_tw.js',
'scripts/i18n/getlang.js',
'images/icon/favicon.ico',
'images/wallossolid.png',
'images/icon/wallossolidwhite.png',
]);
})
);
});

self.addEventListener('fetch', function(event) {
event.respondWith(
caches.match(event.request).then(function(response) {
return response || fetch(event.request);
})
);
});
9 changes: 0 additions & 9 deletions styles/font-awesome.min.css

This file was deleted.

120 changes: 0 additions & 120 deletions styles/font.css

This file was deleted.

0 comments on commit 63fc763

Please sign in to comment.