Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 7d77e0603b 1.230.0 2023-07-24 00:59:49 +02:00
DebaucheryLibrarian 9f727a0fa0 Added analytics configuration. 2023-07-24 00:59:47 +02:00
5 changed files with 13 additions and 3 deletions

View File

@ -18,6 +18,10 @@
<link rel="stylesheet" href="/css/style.css">
<script src="/js/bundle.js" defer></script>
<% if (analytics.enabled) { %>
<script async src="<%- analytics.address %>" data-website-id="<%- analytics.siteId %>"></script>
<% } %>
</head>
<body>
<div id="container"></div>

View File

@ -30,6 +30,11 @@ module.exports = {
},
},
},
analytics: {
enabled: true,
address: 'http://localhost:3000/script.js',
siteId: '1b28ac3b-d229-43bf-aec9-75cf0a72a466',
},
s3: {
enabled: false,
bucket: 'traxxx',

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "traxxx",
"version": "1.229.6",
"version": "1.230.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "traxxx",
"version": "1.229.6",
"version": "1.230.0",
"license": "ISC",
"dependencies": {
"@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.229.6",
"version": "1.230.0",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -151,6 +151,7 @@ async function initServer() {
router.get('*', (req, res) => {
res.render(path.join(__dirname, '../../assets/index.ejs'), {
analytics: config.analytics,
env: JSON.stringify({
sfw: !!req.headers.sfw || Object.prototype.hasOwnProperty.call(req.query, 'sfw'),
login: config.auth.login,