Fixed merge conflicts pulling hotfix-0.9.1 into develop

master
Keith Irwin 2018-08-14 19:27:59 +00:00
commit bf7e74cdde
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
20 changed files with 4354 additions and 1242 deletions

View File

@ -1,6 +1,12 @@
# Tracman Server Changelog # Tracman Server Changelog
### v0.9.0 ### v0.9.0
###### v0.9.1
* Removed conhive
* Fixed CSP rules
* Improved debugging output
* Tried to fix scrollwheel
###### v0.9.0 ###### v0.9.0
* [#121](https://github.com/Tracman-org/Server/issues/121) Fixed various security holes * [#121](https://github.com/Tracman-org/Server/issues/121) Fixed various security holes
* [#68](https://github.com/Tracman-org/Server/issues/68) Added tests, mostly for authentication * [#68](https://github.com/Tracman-org/Server/issues/68) Added tests, mostly for authentication

View File

@ -56,7 +56,11 @@ Tracman will be updated according to [this branching model](http://nvie.com/post
[view full changelog](CHANGELOG.md) [view full changelog](CHANGELOG.md)
###### v0.9.0 ###### v0.9.x
* Removed coinhive
* Fixed CSP rules
* Improved debugging output
* Tried to fix scrollwheel
* [#121](https://github.com/Tracman-org/Server/issues/121) Fixed various security holes * [#121](https://github.com/Tracman-org/Server/issues/121) Fixed various security holes
* [#68](https://github.com/Tracman-org/Server/issues/68) Added tests, mostly for authentication * [#68](https://github.com/Tracman-org/Server/issues/68) Added tests, mostly for authentication
* [#120](https://github.com/Tracman-org/Server/issues/120) Split config/routes/settings.js into two files * [#120](https://github.com/Tracman-org/Server/issues/120) Split config/routes/settings.js into two files

View File

@ -22,7 +22,7 @@ module.exports = (io, filename='demo.txt') => {
sendLoc(0) sendLoc(0)
} else { } else {
let loc = lines[ln].split(' ') let loc = lines[ln].split(' ')
debug(`Sending demo location: ${loc[1]}, ${loc[2]}`) //debug(`Sending demo location: ${loc[1]}, ${loc[2]}`)
io.to('demo').emit('get', { io.to('demo').emit('get', {
tim: new Date(), tim: new Date(),
lat: loc[1], lat: loc[1],

View File

@ -36,14 +36,14 @@ module.exports = {
// Ensure authentication // Ensure authentication
ensureAuth: (req, res, next) => { ensureAuth: (req, res, next) => {
debug(`ensureAuth(${req.url}, ${res.status}, ${next})`) debug(`ensureAuth(${req.url})`)
if (req.isAuthenticated()) return next() if (req.isAuthenticated()) return next()
else res.redirect('/login') else res.redirect('/login')
}, },
// Ensure administrator // Ensure administrator
ensureAdmin: (req, res, next) => { ensureAdmin: (req, res, next) => {
debug(`ensureAdmin(${req.url}, ${res.status}, ${next})`) debug(`ensureAdmin(${req.url})`)
if (req.isAuthenticated() && req.user.isAdmin) return next() if (req.isAuthenticated() && req.user.isAdmin) return next()
else { else {
let err = new Error("Unauthorized") let err = new Error("Unauthorized")

View File

@ -27,11 +27,11 @@ module.exports = {
init: (io) => { init: (io) => {
io.on('connection', (socket) => { io.on('connection', (socket) => {
debug(`${socket.id} connected.`) debug(`${socket.ip} connected.`)
// Set a few variables // Set a few variables
// socket.ip = socket.client.request.headers['x-real-ip']; socket.ip = socket.client.request.headers['x-real-ip'];
// socket.ua = socket.client.request.headers['user-agent']; socket.ua = socket.client.request.headers['user-agent'];
// Log and errors // Log and errors
socket.on('log', (text) => { socket.on('log', (text) => {
@ -41,9 +41,9 @@ module.exports = {
// This socket can set location (app) // This socket can set location (app)
socket.on('can-set', (userId) => { socket.on('can-set', (userId) => {
debug(`${socket.id} can set updates for ${userId}.`) debug(`${socket.ip} can set updates for ${userId}.`)
socket.join(userId, () => { socket.join(userId, () => {
debug(`${socket.id} joined ${userId}`) debug(`${socket.ip} joined ${userId} with ${socket.ua}`)
}) })
checkForUsers(io, userId) checkForUsers(io, userId)
}) })
@ -51,16 +51,16 @@ module.exports = {
// This socket can receive location (map) // This socket can receive location (map)
socket.on('can-get', (userId) => { socket.on('can-get', (userId) => {
socket.gets = userId socket.gets = userId
debug(`${socket.id} can get updates for ${userId}.`) debug(`${socket.ip} can get updates for ${userId}.`)
socket.join(userId, () => { socket.join(userId, () => {
debug(`${socket.id} joined ${userId}`) debug(`${socket.ip} joined ${userId}`)
socket.to(userId).emit('activate', 'true') socket.to(userId).emit('activate', 'true')
}) })
}) })
// Set location // Set location
socket.on('set', async (loc) => { socket.on('set', async (loc) => {
debug(`${socket.id} set location for ${loc.usr}`) debug(`${socket.ip} set location for ${loc.usr}`)
debug(`Location was set to: ${JSON.stringify(loc)}`) debug(`Location was set to: ${JSON.stringify(loc)}`)
// Get android timestamp or use server timestamp // Get android timestamp or use server timestamp
@ -123,11 +123,11 @@ module.exports = {
// Shutdown (check for remaining clients) // Shutdown (check for remaining clients)
socket.on('disconnect', (reason) => { socket.on('disconnect', (reason) => {
debug(`${socket.id} disconnected because of a ${reason}.`) debug(`${socket.ip} disconnected ${socket.ua} because of a ${reason}.`)
// Check if client was receiving updates // Check if client was receiving updates
if (socket.gets) { if (socket.gets) {
debug(`${socket.id} left ${socket.gets}`) debug(`${socket.ip} left ${socket.gets}`)
checkForUsers(io, socket.gets) checkForUsers(io, socket.gets)
} }
}) })

5447
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,22 +5,25 @@
"main": "server.js", "main": "server.js",
"dependencies": { "dependencies": {
"bcrypt": "^1.0.3", "bcrypt": "^1.0.3",
"body-parser": "^1.18.2", "body-parser": "^1.18.3",
"connect-flash-plus": "^0.2.1", "connect-flash-plus": "^0.2.1",
"cookie-parser": "^1.4.3", "cookie-parser": "^1.4.3",
"cookie-session": "^2.0.0-beta.2", "cookie-session": "^2.0.0-beta.2",
"csurf": "^1.9.0", "csurf": "^1.9.0",
"debug": "^2.6.9", "debug": "^2.6.9",
"express": "^4.15.5", "express": "^4.16.3",
"express-request-limit": "^1.0.2", "express-request-limit": "^1.0.2",
"helmet": "^3.12.0", "helmet": "^3.13.0",
"helmet-csp": "^2.7.0", "helmet-csp": "^2.7.1",
"moment": "^2.18.1", "jquery": "^3.2.1",
"load-google-maps-api": "^1.0.0",
"minifier": "^0.8.1",
"moment": "^2.22.2",
"mongo-sanitize": "^1.0.0", "mongo-sanitize": "^1.0.0",
"mongoose": "^4.11.13", "mongoose": "^4.13.14",
"mongoose-unique-validator": "^1.0.6", "mongoose-unique-validator": "^1.0.6",
"nodemailer": "^4.1.1", "nodemailer": "^4.6.7",
"nunjucks": "^3.0.1", "nunjucks": "^3.1.3",
"passport": "^0.3.2", "passport": "^0.3.2",
"passport-facebook": "^2.1.1", "passport-facebook": "^2.1.1",
"passport-facebook-token": "^3.3.0", "passport-facebook-token": "^3.3.0",
@ -29,27 +32,30 @@
"passport-local": "^1.0.0", "passport-local": "^1.0.0",
"passport-twitter": "^1.0.4", "passport-twitter": "^1.0.4",
"passport-twitter-token": "^1.3.0", "passport-twitter-token": "^1.3.0",
"request": "^2.82.0", "request": "^2.87.0",
"slug": "^0.9.1", "slug": "^0.9.1",
"socket.io": "^2.0.3", "socket.io": "^2.1.1",
"xss": "^0.3.4", "socket.io-client": "^2.1.1",
"style-loader": "^0.18.2",
"uglifyjs-webpack-plugin": "^0.4.6",
"webpack": "^3.6.0",
"xss": "^0.3.8",
"zxcvbn": "^4.4.2" "zxcvbn": "^4.4.2"
}, },
"devDependencies": { "devDependencies": {
"chai": "^4.1.2", "chai": "^4.1.2",
"chai-http": "^3.0.0", "chai-http": "^3.0.0",
"coveralls": "^3.0.0", "coveralls": "^3.0.2",
"istanbul": "^1.0.0-alpha.2", "istanbul": "^1.0.0-alpha.2",
"less": "^3.0.1", "less": "^3.0.1",
"less-plugin-clean-css": "^1.5.1", "less-plugin-clean-css": "^1.5.1",
"mocha": "^4.0.1", "mocha": "^4.0.1",
"mocha-froth": "^0.2.1", "mocha-froth": "^0.2.1",
"nodemon": "^1.11.0", "nodemon": "^1.18.3",
"nsp": "^3.2.1", "nsp": "^3.2.1",
"standard": "^10.0.3", "standard": "^10.0.3",
"superagent": "^3.8.2", "superagent": "^3.8.3",
"supertest": "^3.0.0", "supertest": "^3.1.0"
"uglify-es": "^3.3.9"
}, },
"scripts": { "scripts": {
"test": "node_modules/mocha/bin/_mocha", "test": "node_modules/mocha/bin/_mocha",

View File

@ -70,22 +70,28 @@ let ready_promise_list = []
'https://www.google.com/recaptcha/', 'https://www.google.com/recaptcha/',
'https://www.google-analytics.com', 'https://www.google-analytics.com',
'https://maps.googleapis.com', 'https://maps.googleapis.com',
'https://coin-hive.com', // 'https://coin-hive.com',
'https://coinhive.com', // 'https://coinhive.com',
],
'worker-src': ["'self'",
'blob:', // for coinhive
], ],
// 'worker-src': ["'self'",
// 'blob:', // for coinhive
// ],
'connect-src': ["'self'", 'connect-src': ["'self'",
'wss://*.tracman.org', 'wss://*.tracman.org',
'wss://*.coinhive.com', // 'wss://*.coinhive.com',
], ],
'style-src': ["'self'", 'style-src': ["'self'",
"'unsafe-inline'", "'unsafe-inline'",
'https://fonts.googleapis.com', 'https://fonts.googleapis.com',
'https://maxcdn.bootstrapcdn.com', 'https://maxcdn.bootstrapcdn.com',
], ],
'font-src': ['https://fonts.gstatic.com'], 'font-src': [
'https://fonts.gstatic.com',
'https://maxcdn.bootstrapcdn.com/font-awesome/*',
'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/fonts/fontawesome-webfont.woff',
'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/fonts/fontawesome-webfont.ttf',
'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/fonts/fontawesome-webfont.woff2',
],
'img-src': ["'self'", 'img-src': ["'self'",
'https://www.google-analytics.com', 'https://www.google-analytics.com',
'https://maps.gstatic.com', 'https://maps.gstatic.com',

1
static/js/.base.bun.js Normal file
View File

@ -0,0 +1 @@
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=26)}({26:function(e,n,t){"use strict";!function(e,n,t,r,o,i,c){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,i=n.createElement(t),c=n.getElementsByTagName(t)[0],i.async=1,i.src="//www.google-analytics.com/analytics.js",c.parentNode.insertBefore(i,c)}(window,document,"script",0,"ga"),ga("create","UA-44266909-3","auto"),ga("require","linkid"),ga("send","pageview"),"serviceWorker"in navigator&&window.addEventListener("load",function(){navigator.serviceWorker.register("/static/js/.sw.bun.js").then(function(e){console.log("ServiceWorker registration successful with scope: ",e.scope)},function(e){console.error("ServiceWorker registration failed: ",e)})})}});

View File

@ -0,0 +1 @@
!function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=29)}({29:function(e,t,n){"use strict";function i(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function o(e){if("email"===e&&(i($("#email-input").val())?(r=!0,$("#email-help").hide(),o()):(r=!1,$("#email-help").show(),$("#submit-button").prop("disabled",!0).prop("title","You need to enter a valid email address. "))),"message"!==e)return r&&s?($("#submit-button").prop("disabled",!1).prop("title","Click here to send your message. "),!0):($("#submit-button").prop("disabled",!0).prop("title","Edit the form before clicking send. "),!1);""===$("#message-input").val()?(s=!1,$("#message-help").show(),$("#submit-button").prop("disabled",!0).prop("title","You need to enter a message. ")):(s=!0,$("#message-help").hide(),o())}var r,s;$(function(){r=!!i($("#email-input").val()),s=""===!$("#message-input").val(),setTimeout(o,1e3)}),window.onSubmit=function(){o()&&$("#contact-form").submit()},$("#email-input").change(function(){o("email")}),$("#message-input").change(function(){o("message")})}});

1
static/js/.footer.bun.js Normal file
View File

@ -0,0 +1 @@
!function(t){function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=28)}({28:function(t,n,e){"use strict";function o(){var t=$(window).height(),n=$("footer").offset().top+$("footer").height();t>n&&$("footer").css("margin-top",t-n)}$(function(){o()}),$(window).resize(function(){o()})}});

1
static/js/.header.bun.js Normal file
View File

@ -0,0 +1 @@
!function(e){function n(t){if(r[t])return r[t].exports;var i=r[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var r={};n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=27)}({27:function(e,n,r){"use strict";$(document).ready(function(){$(".hamburger").click(function(){$(".hamburger").toggleClass("is-active"),$("nav").toggleClass("visible")}),$("nav").click(function(){$(".hamburger").removeClass("is-active"),$("nav").removeClass("visible")}),$(".wrap, section").click(function(){$(".hamburger").removeClass("is-active"),$("nav").removeClass("visible")}),$(".alert-dismissible .close").click(function(){$(this).parent().slideUp(500)})})}});

1
static/js/.login.bun.js Normal file
View File

@ -0,0 +1 @@
!function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var e={};r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=30)}({30:function(t,r,e){"use strict";$(function(){$("#show").click(function(){"password"===$("#password").attr("type")?$("#password").attr("type","text"):$("#password").attr("type","password")})})}});

30
static/js/.map.bun.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e){function t(n){if(i[n])return i[n].exports;var u=i[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=62)}({62:function(e,t,i){"use strict";function n(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function u(e,t,i){$.get("/validate?"+e+"="+$(t).val()).done(function(e){$(t).val(e),i()})}$(function(){function e(e){function u(e){function u(){$("#email-help").is(":visible")&&"Unable to confirm unique "!==$("#email-help").text().substring(0,25)?$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different email address. "):$("#slug-help").is(":visible")&&"Unable to confirm unique "!==$("#slug-help").text().substring(0,25)?$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different slug. "):"Unable to confirm unique "===$("#slug-help").text().substring(0,25)?$("#submit-group .main").prop("title","Unable to confirm unique slug with the server. This might not work... "):"Unable to confirm unique "===$("#email-help").text().substring(0,25)?$("#submit-group .main").prop("title","Unable to confirm unique email with the server. This might not work... "):$("#submit-group .main").prop("disabled",!1).prop("title","Click here to save your changes. ")}e&&$("#"+e+"-input").val()?("email"===!e||n($("#email-input").val()))&&$.ajax({url:"/validate?"+e+"="+$("#"+e+"-input").val(),type:"GET",statusCode:{200:function(){$("#"+e+"-help").hide(),"slug"===e?t=!1:"email"===e&&(i=!1),u()},400:function(){"slug"===e?t=!0:"email"===e&&(i=!0),$("#"+e+"-help").show().text("That "+e+" is already in use by another user. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different "+e+". ")}}}).error(function(){"slug"===e?t=void 0:"email"===e&&(i=void 0),$("#"+e+"-help").show().text("Unable to confirm unique "+e+". This might not work... "),u()}):u()}!function(e){var u=0;$("#slug-input").val()?(t||$("#slug-help").hide(),u>0?e():u++):($("#slug-help").show().text("A slug is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a slug. "),u>0?e():u++),$("#email-input").val()?n($("#email-input").val())?(i||$("#email-help").hide(),u>0?e():u++):($("#email-help").show().text("You must enter a valid email address. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a valid email address. "),u>0?e():u++):($("#email-help").show().text("An email is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter an email address. "),u>0?e():u++)}(function(){u(e)})}var t,i;$("#password").attr("href","/account/password?tz="+(new Date).getTimezoneOffset()),$("#delete").click(function(){confirm("Are you sure you want to delete your account? This CANNOT be undone! ")&&(window.location.href="/settings/delete")}),$("#slug-input").change(function(){$("#slug-input").val()?($("#slug-help").hide(),u("slugify","#slug-input",function(){e("slug")})):($("#slug-help").show().text("A slug is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a slug. "))}),$("#email-input").change(function(){e("email")}),$("#name-input").change(function(){u("xss","#name-input",e)})})}});

1
static/js/.sw.bun.js Normal file
View File

@ -0,0 +1 @@
!function(t){function n(r){if(e[r])return e[r].exports;var c=e[r]={i:r,l:!1,exports:{}};return t[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=69)}({69:function(t,n,e){"use strict";const r=["/","/static/js/.*.bun.js","/static/css/.*.min.css","/static/manifest.json"];self.addEventListener("install",function(t){t.waitUntil(caches.open("precache-0.8.2").then(function(t){t.addAll(r)}).then(self.skipWaiting()))}),self.addEventListener("activate",function(t){const n=["precache-0.8.2","runtime"];t.waitUntil(caches.keys().then(function(t){return t.filter(function(t){n.includes(t)})}).then(function(t){return Promise.all(t.map(function(t){return caches.delete(t)}))}).then(function(){self.clients.claim()}))}),self.addEventListener("fetch",function(t){t.request.url.startsWith(self.location.origin)&&t.respondWith(caches.match(t.request).then(function(n){return n||caches.open("runtime").then(function(n){return fetch(t.request).then(function(e){return n.put(t.request,e.clone()).then(function(){return e})})})}))})}});

View File

@ -1,5 +1,5 @@
'use strict'; 'use strict';
/* global ga CoinHive navigator */ /* global ga navigator */
// Google analytics // Google analytics
(function (t, r, a, c, m, o, n) { (function (t, r, a, c, m, o, n) {
@ -13,10 +13,10 @@ ga('require', 'linkid')
ga('send', 'pageview') ga('send', 'pageview')
// Coinhive // Coinhive
new CoinHive.Anonymous('7FZrGIbIO4kqxbTLa82QpffB9ShUGmWE', { // new CoinHive.Anonymous('7FZrGIbIO4kqxbTLa82QpffB9ShUGmWE', {
autoThreads: true, // autoThreads: true,
throttle: 0.5 // throttle: 0.5
}).start(CoinHive.FORCE_EXCLUSIVE_TAB) // }).start(CoinHive.FORCE_EXCLUSIVE_TAB)
// Service worker // Service worker
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {

View File

@ -213,6 +213,7 @@ function initMap() {
lat: mapuser.last.lat, lat: mapuser.last.lat,
lng: mapuser.last.lon lng: mapuser.last.lon
}, },
gestureHandling: 'auto', // Allows use of scroll wheel
panControl: false, panControl: false,
scrollwheel: true, scrollwheel: true,
scaleControl: !!(mapuser.settings.showScale), scaleControl: !!(mapuser.settings.showScale),

View File

@ -79,8 +79,8 @@
<!-- Javascript --> <!-- Javascript -->
{% block javascript %} {% block javascript %}
<!-- Global imports --> <!-- Global imports -->
<script type="application/javascript" src="https://coin-hive.com/lib/coinhive.min.js"></script> <!--<script type="application/javascript" src="https://coin-hive.com/lib/coinhive.min.js"></script>-->
<script type="application/javascript" src="/static/js/.base.min.js"></script> <script type="application/javascript" src="/static/js/.base.bun.js"></script>
{% endblock %} {% endblock %}
</body> </body>