Readded serviceworker, and fixed namechange error

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-14 13:31:52 +01:00
parent e73ce3a702
commit 8974e8cde0
12 changed files with 2599 additions and 44 deletions

View File

@@ -62,6 +62,8 @@ router.route('/api/apply/:id').get(function(req,res) {
correct: true,
stylesheet: "style.css",
embed: false,
critical: "f",
critical_enabled: true
}
res.render('layouts/client/token', data);
});
@@ -77,6 +79,8 @@ router.route('/api/apply/:id').get(function(req,res) {
correct: false,
stylesheet: "style.css",
embed: false,
critical: "f",
critical_enabled: true
}
res.render('layouts/client/token', data);
}
@@ -95,6 +99,8 @@ router.route('/api/apply').get(function(req, res, next) {
correct: false,
stylesheet: "style.css",
embed: false,
critical: "f",
critical_enabled: true
}
res.render('layouts/client/token', data);
});
@@ -115,7 +121,9 @@ function root(req, res, next) {
analytics: analytics,
stylesheet: "style.css",
embed: false,
client: false
client: false,
critical: "f",
critical_enabled: true
}
res.render('layouts/client/remote', data);
} else if(subdomain[0] == "www") {
@@ -128,7 +136,9 @@ function root(req, res, next) {
analytics: analytics,
stylesheet: "style.css",
embed: false,
client: false
client: false,
critical: "f",
critical_enabled: true
}
if(subdomain[0] == "client") {
data.client = true;
@@ -157,7 +167,9 @@ function channel(req, res, next) {
analytics: analytics,
stylesheet: "style.css",
embed: false,
client: false
client: false,
critical: "f",
critical_enabled: true
}
res.render('layouts/client/remote', data);
} else if(subdomain.length >= 2 && subdomain[0] == "www") {
@@ -172,6 +184,8 @@ function channel(req, res, next) {
analytics: analytics,
stylesheet: "embed.css",
embed: true,
critical: "e",
critical_enabled: false
}
res.render('layouts/client/embed', data);
} else if(req.params.channel_name == "o_callback") {
@@ -186,7 +200,9 @@ function channel(req, res, next) {
analytics: analytics,
stylesheet: "style.css",
embed: false,
client:false
client:false,
critical: "c",
critical_enabled: false
}
if(subdomain == "client") {
data.client = true;