Web version bugs

Skylar Ittner 4 years ago
parent 5651f28bdb
commit bbf5e82f93

@ -258,6 +258,11 @@ function initBrowser() {
} }
setupHTML5BarcodeScanner(); setupHTML5BarcodeScanner();
$("#app").on("click", ".geolink", function (evt) {
window.open($(this).attr("href"), "_blank");
evt.preventDefault();
});
} }
function initPlatform() { function initPlatform() {

@ -1,4 +1,4 @@
/* /*
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
@ -6,26 +6,26 @@
var cachename = "v1.5.0_0"; var cachename = "v1.5.0_0";
self.addEventListener('fetch', (event) => { //self.addEventListener('fetch', (event) => {
event.respondWith( // event.respondWith(
caches.match(event.request).then((resp) => { // caches.match(event.request).then((resp) => {
return resp || fetch(event.request).then((response) => { // return resp || fetch(event.request).then((response) => {
return caches.open(cachename).then((cache) => { // return caches.open(cachename).then((cache) => {
try { // try {
// only cache map data // // only cache map data
if (event.request.url.includes("maps.netsyms.net")) { // if (event.request.url.includes("maps.netsyms.net")) {
cache.put(event.request, response.clone()); // cache.put(event.request, response.clone());
} // }
} catch (ex) { // } catch (ex) {
}
return response;
});
});
})
);
});
// //
// }
// return response;
// });
// });
// })
// );
//});
//self.addEventListener('install', function (event) { //self.addEventListener('install', function (event) {
// event.waitUntil( // event.waitUntil(
// caches.open(cachename).then((cache) => { // caches.open(cachename).then((cache) => {

Loading…
Cancel
Save