diff --git a/public/s/css/f0ckm.css b/public/s/css/f0ckm.css
index 301bada..7ca5ebb 100644
--- a/public/s/css/f0ckm.css
+++ b/public/s/css/f0ckm.css
@@ -1,14 +1,11 @@
-/* =============================================
- f0ckm.css - Unified Stylesheet
- Merged: f0ck.css + w0bm.css + view styles
- ============================================= */
-
/* f0ckwork omega */
/* originally written by sirx for f0ck.me */
/* heavily modified for f0ckm by Kibi Kelburton */
/* use whatever you like */
/* once upon a time this was a stiefelstrapse! but no more! */
+/* This used to be a soulful attempt but ended up in being artificially enhanced! */
+
:root {
--white: #fff;
--black: #000;
@@ -1087,9 +1084,6 @@ html[theme='light'] button,
html[theme='light'] .btn,
html[theme='paper'] button,
html[theme='paper'] .btn {
- background: #ffffff;
- color: #334155;
- border: 1px solid #cbd5e1;
}
html[theme='light'] button:hover,
@@ -10834,8 +10828,6 @@ body.layout-legacy .comment-content img.emoji {
filter: brightness(1.2);
}
-/* === SITE OVERRIDES (formerly w0bm.css) === */
-
.navbar-brand {
display: grid;
grid-template-columns: 1fr auto;
@@ -11009,9 +11001,9 @@ html[theme="f0ck95"] .embed-responsive.embed-responsive-16by9 {
background-color: transparent;
}
-.v0ck_player_controls {
+/* .v0ck_player_controls {
background: rgba(0, 0, 0, 0.10) !important;
-}
+} */
html[theme="term"] .image-brand {
filter: hue-rotate(-50deg);
diff --git a/public/s/css/v0ck.css b/public/s/css/v0ck.css
index 5cd596a..c4166cd 100644
--- a/public/s/css/v0ck.css
+++ b/public/s/css/v0ck.css
@@ -106,7 +106,7 @@
}
.v0ck_player_button svg:hover {
- filter: drop-shadow(0 0 9px var(--accent));
+ filter: drop-shadow(0 0 1px var(--accent));
fill: #000;
stroke: var(--accent);
stroke-width: 30px;
@@ -132,7 +132,7 @@
padding: 0;
align-items: center;
z-index: 2;
- background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 20%, rgba(0, 0, 0, 0) 100%);
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 1%, rgba(0, 0, 0, 0) 100%);
transition: opacity .3s, transform .3s;
flex-wrap: wrap;
transform: translateY(100%) translateY(-3px);
diff --git a/public/s/js/comments.js b/public/s/js/comments.js
index 2e32a91..73b21d7 100644
--- a/public/s/js/comments.js
+++ b/public/s/js/comments.js
@@ -745,7 +745,8 @@ class CommentSystem {
// Render skeleton (Result: Layout visible immediately)
// Skip when preserveScroll=true (tab re-focus refresh): the user already sees comments,
// so wiping the DOM causes the browser to lose the #c anchor element and auto-scroll to top.
- if (!scrollToId && !preserveScroll) {
+ // Only render skeleton for logged-in users to avoid flashing "Login to comment" before comments/permissions load.
+ if (!scrollToId && !preserveScroll && this.user) {
this.render([], this.user, initialIsSubscribed);
this.restoreState(state);
}
diff --git a/public/s/js/f0ckm.js b/public/s/js/f0ckm.js
index caa87e6..47f06e9 100644
--- a/public/s/js/f0ckm.js
+++ b/public/s/js/f0ckm.js
@@ -9168,7 +9168,7 @@ class NotificationSystem {
// Restore mention placeholders
content = content.replace(/\x02MNT(\d+)\x03/g, (_, i) => mentionStore[+i]);
} catch (e) {
- console.error('Marked error in w0bm.js', e);
+ console.error('Marked error:', e);
// Fallback
content = content.replace(/&/g, "&").replace(//g, ">");
content = content.replace(/^>(.*)/gm, '>$1');
@@ -10575,7 +10575,8 @@ document.addEventListener('DOMContentLoaded', () => {
const myHallsError = document.getElementById('my-halls-modal-error');
const isLoggedIn = window.f0ckSession && window.f0ckSession.logged_in;
- const csrf = window.f0ckSession?.csrf_token || '';
+ const getCsrf = () => (window.f0ckSession && window.f0ckSession.csrf_token) || '';
+ const csrf = getCsrf();
if (myHallsSection) {
myHallsSection.style.display = isLoggedIn ? '' : 'none';
@@ -10696,11 +10697,15 @@ document.addEventListener('DOMContentLoaded', () => {
confirmBtn.disabled = true;
confirmBtn.textContent = window.f0ckI18n?.hall_adding || 'Adding...';
+ const token = getCsrf();
try {
const resp = await fetch('/mod/halls/add', {
method: 'POST',
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- body: `id=${itemid}&hall=${encodeURIComponent(hallSlug)}`
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ 'X-CSRF-Token': token
+ },
+ body: `id=${itemid}&hall=${encodeURIComponent(hallSlug)}&csrf_token=${encodeURIComponent(token)}`
});
const data = await resp.json();
if (data.success) {
@@ -10722,6 +10727,7 @@ document.addEventListener('DOMContentLoaded', () => {
const onMyHallConfirm = async () => {
if (!myHallsSelect || !myHallsConfirmBtn || !myHallsError) return;
let hallSlug = myHallsSelect.value;
+ const token = getCsrf();
// Create new hall inline if requested
if (!hallSlug && myHallsNewName && myHallsNewName.value.trim()) {
@@ -10732,8 +10738,8 @@ document.addEventListener('DOMContentLoaded', () => {
myHallsConfirmBtn.textContent = window.f0ckI18n?.hall_creating || 'Creating…';
const r = await fetch('/api/v2/me/halls', {
method: 'POST',
- headers: { 'Content-Type': 'application/json', 'x-csrf-token': csrf },
- body: JSON.stringify({ name: newName, slug: newSlug })
+ headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': token },
+ body: JSON.stringify({ name: newName, slug: newSlug, csrf_token: token })
});
const d = await r.json();
if (!d.success) throw new Error(d.message || d.msg || 'Failed to create');
@@ -10758,8 +10764,8 @@ document.addEventListener('DOMContentLoaded', () => {
try {
const resp = await fetch(`/api/v2/me/halls/${encodeURIComponent(hallSlug)}/items`, {
method: 'POST',
- headers: { 'Content-Type': 'application/json', 'x-csrf-token': csrf },
- body: JSON.stringify({ item_id: itemid })
+ headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': token },
+ body: JSON.stringify({ item_id: itemid, csrf_token: token })
});
const data = await resp.json();
if (data.success) {
@@ -10796,11 +10802,15 @@ document.addEventListener('DOMContentLoaded', () => {
if (!confirm(`Remove from hall "${hallSlug}"?`)) return;
siteHallRemoveBtn.disabled = true;
siteHallRemoveBtn.textContent = window.f0ckI18n?.hall_removing || 'Removing…';
+ const token = getCsrf();
try {
const resp = await fetch('/mod/halls/remove', {
method: 'POST',
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- body: `id=${itemid}&hall=${encodeURIComponent(hallSlug)}`
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ 'X-CSRF-Token': token
+ },
+ body: `id=${itemid}&hall=${encodeURIComponent(hallSlug)}&csrf_token=${encodeURIComponent(token)}`
});
const data = await resp.json();
if (data.success) {
@@ -10825,10 +10835,11 @@ document.addEventListener('DOMContentLoaded', () => {
if (!slug) return;
myHallsRemoveBtn.disabled = true;
myHallsRemoveBtn.textContent = 'Removing…';
+ const token = getCsrf();
try {
const resp = await fetch(`/api/v2/me/halls/${encodeURIComponent(slug)}/items/${itemid}`, {
method: 'DELETE',
- headers: { 'x-csrf-token': csrf }
+ headers: { 'X-CSRF-Token': token }
});
const data = await resp.json();
if (data.success) {
diff --git a/public/sw.js b/public/sw.js
index d6266ca..001d663 100644
--- a/public/sw.js
+++ b/public/sw.js
@@ -1,4 +1,4 @@
-const CACHE_NAME = 'w0bm-pwa-v9';
+const CACHE_NAME = 'f0ckm-pwa';
const ASSETS_TO_CACHE = [
'/',
'/s/css/f0ckm.css',
diff --git a/src/inc/locales/en.json b/src/inc/locales/en.json
index 6cfef90..4454dfa 100644
--- a/src/inc/locales/en.json
+++ b/src/inc/locales/en.json
@@ -520,7 +520,7 @@
"limit_reached": "Upload limit reached (0/{limit})",
"limit_remaining": "{remaining}/{limit} uploads remaining",
"auth_required_title": "Authentication Required",
- "auth_required_text": "You must be logged in to upload content to w0bm.",
+ "auth_required_text": "You must be logged in to upload content.",
"login_btn": "Login"
},
"messages": {
diff --git a/src/inc/locales/nl.json b/src/inc/locales/nl.json
index c33b5e7..e6f74fe 100644
--- a/src/inc/locales/nl.json
+++ b/src/inc/locales/nl.json
@@ -514,7 +514,7 @@
"limit_reached": "Uploadlimiet bereikt (0/{limit})",
"limit_remaining": "{remaining}/{limit} uploads over",
"auth_required_title": "Authenticatie Vereist",
- "auth_required_text": "Je moet ingelogd zijn om inhoud naar w0bm te uploaden.",
+ "auth_required_text": "Je moet ingelogd zijn om inhoud naar f0ckm te uploaden.",
"login_btn": "Inloggen"
},
"messages": {
diff --git a/src/inc/locales/zange.json b/src/inc/locales/zange.json
index 7c3ad42..e7bd527 100644
--- a/src/inc/locales/zange.json
+++ b/src/inc/locales/zange.json
@@ -515,7 +515,7 @@
"limit_reached": "Aufladierungsgrenze erreicht (0/{limit})",
"limit_remaining": "{remaining}/{limit} Aufladierungen verbleibend",
"auth_required_title": "Authentifizierung erforderlich",
- "auth_required_text": "Sie müssen angemeldet sein, um Inhalte auf w0bm hochzuladen.",
+ "auth_required_text": "Sie müssen angemeldet sein, um Inhalte hochzuladen.",
"login_btn": "Anmeldung"
},
"messages": {
diff --git a/src/inc/routes/index.mjs b/src/inc/routes/index.mjs
index dda4a91..6f20159 100644
--- a/src/inc/routes/index.mjs
+++ b/src/inc/routes/index.mjs
@@ -431,7 +431,7 @@ export default (router, tpl) => {
session: (req.session && req.session.user) ? { ...req.session } : false,
page_meta: {
title: 'about',
- description: 'About w0bm.com',
+ description: 'About',
url: `https://${cfg.main.url.domain}/about`
}
}, req)
diff --git a/src/inc/routes/upload.mjs b/src/inc/routes/upload.mjs
index e03945f..913f291 100644
--- a/src/inc/routes/upload.mjs
+++ b/src/inc/routes/upload.mjs
@@ -42,7 +42,7 @@ export default (router, tpl) => {
web_url_upload: !!cfg.websrv.web_url_upload,
page_meta: {
title: 'upload',
- description: 'Upload content to w0bm',
+ description: 'Upload content',
url: `https://${cfg.main.url.domain}/upload`
}
}, req)
diff --git a/src/inc/routes/user_halls.mjs b/src/inc/routes/user_halls.mjs
index a82ec8f..8db9e6a 100644
--- a/src/inc/routes/user_halls.mjs
+++ b/src/inc/routes/user_halls.mjs
@@ -299,9 +299,9 @@ export default (router, tpl) => {
router.post(/^\/api\/v2\/me\/halls\/?$/, async (req, res) => {
if (cfg.websrv.userhalls_enabled === false) return res.writeHead(404, { 'Content-Type': 'application/json' }).end(JSON.stringify({ success: false }));
if (!requireLogin(req, res)) return;
- const name = (req.post.name || '').trim();
- const slug = slugify(req.post.slug || name);
- const description = (req.post.description || '').trim() || null;
+ const name = ((req.post?.name ?? req.body?.name) || '').trim();
+ const slug = slugify((req.post?.slug ?? req.body?.slug) || name);
+ const description = ((req.post?.description ?? req.body?.description) || '').trim() || null;
if (!name || !slug) {
return res.writeHead(400, { 'Content-Type': 'application/json' })
@@ -319,7 +319,7 @@ export default (router, tpl) => {
if (cfg.websrv.userhalls_enabled === false) return res.writeHead(404, { 'Content-Type': 'application/json' }).end(JSON.stringify({ success: false }));
if (!requireLogin(req, res)) return;
const slug = decodeURIComponent(req.params.slug);
- const { name, slug: newSlugRaw, description, is_private } = req.post;
+ const { name, slug: newSlugRaw, description, is_private } = (req.post || req.body || {});
const newSlug = newSlugRaw ? slugify(newSlugRaw) : undefined;
const result = await f0cklib.updateUserHall(req.session.id, slug, {
@@ -361,7 +361,7 @@ export default (router, tpl) => {
router.post(/^\/api\/v2\/me\/halls\/(?[^/]+)\/items\/?$/, async (req, res) => {
if (!requireLogin(req, res)) return;
const slug = decodeURIComponent(req.params.slug);
- const itemId = +req.post.item_id;
+ const itemId = +(req.post?.item_id ?? req.body?.item_id);
if (!itemId) {
return res.writeHead(400, { 'Content-Type': 'application/json' })
diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs
index 303e18b..25221bd 100644
--- a/src/inc/trigger/parser.mjs
+++ b/src/inc/trigger/parser.mjs
@@ -328,7 +328,7 @@ export default async bot => {
}
if (e.type === 'tg' && // proto: tg
- !isWCommand && // !w / !w0bm
+ !isWCommand && // !w
!e.raw?.forward_date && // is forwarded?
!mediagroupids.has(mediaGroupId) // prepared mediagroup?
) {
diff --git a/views/item-partial-legacy.html b/views/item-partial-legacy.html
index 78e47b1..85b1c86 100644
--- a/views/item-partial-legacy.html
+++ b/views/item-partial-legacy.html
@@ -216,17 +216,19 @@
+ @if(session || !hide_comments_from_public)
+ @endif
diff --git a/views/matrix.html b/views/matrix.html
deleted file mode 100644
index 883a5cc..0000000
--- a/views/matrix.html
+++ /dev/null
@@ -1,8 +0,0 @@
-@include(snippets/header)
-
-
-
Matrix
-
#w0bm:w0bm.com
-
-
-@include(snippets/footer)
diff --git a/views/snippets/footer.html b/views/snippets/footer.html
index 6883be1..9ec5418 100644
--- a/views/snippets/footer.html
+++ b/views/snippets/footer.html
@@ -127,7 +127,7 @@
@endif
@if(private_society && !session)