Move common js files to folder

This commit is contained in:
Kenneth Bruen 2022-09-20 00:14:16 +03:00
parent c60c20a736
commit 2aa147060a
Signed by: kbruen
GPG key ID: C1980A470C3EE5B1
8 changed files with 16 additions and 16 deletions

View file

@ -8,9 +8,9 @@
<link rel="stylesheet" href="/base.css">
<script src="/worker.js"></script>
<script src="/back.js"></script>
<script src="/items.js"></script>
<script src="/common/worker.js"></script>
<script src="/common/back.js"></script>
<script src="/common/items.js"></script>
</head>
<body>
<h1>About</h1>

0
back.js → common/back.js Normal file → Executable file
View file

0
items.js → common/items.js Normal file → Executable file
View file

0
worker.js → common/worker.js Normal file → Executable file
View file

View file

@ -10,8 +10,8 @@
<link rel="stylesheet" href="/base.css">
<script src="/worker.js"></script>
<script src="/items.js"></script>
<script src="/common/worker.js"></script>
<script src="/common/items.js"></script>
</head>
<body>
<h1>InfoTren</h1>

10
sw.js Normal file → Executable file
View file

@ -1,7 +1,7 @@
const VERSION = 'v6'
const VERSION = 'v8'
const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/'
const API_TRAINS = `${API_ORIGIN}v3/trains`
const API_STATIONS = `${API_ORIGIN}v2/stations`
const API_STATIONS = `${API_ORIGIN}v3/stations`
self.addEventListener('install', (event) => {
event.waitUntil(
@ -13,9 +13,9 @@ self.addEventListener('install', (event) => {
'/',
// Utility JS
'/worker.js',
'/items.js',
'/back.js',
'/common/worker.js',
'/common/items.js',
'/common/back.js',
// Base
'/base.css',

View file

@ -10,9 +10,9 @@
<link rel="stylesheet" href="/base.css">
<script src="/worker.js"></script>
<script src="/back.js"></script>
<script src="/items.js"></script>
<script src="/common/worker.js"></script>
<script src="/common/back.js"></script>
<script src="/common/items.js"></script>
<script src="train.js"></script>
</head>
<body>

View file

@ -11,9 +11,9 @@
<link rel="stylesheet" href="/base.css">
<link rel="stylesheet" href="view-train.css">
<script src="/worker.js"></script>
<script src="/back.js"></script>
<script src="/items.js"></script>
<script src="/common/worker.js"></script>
<script src="/common/back.js"></script>
<script src="/common/items.js"></script>
<script src="view-train.js"></script>
</head>
<body>