This commit is contained in:
2026-09-05 01:30:24 +02:00
parent 90e515af8a
commit a5c45d693a
16 changed files with 48 additions and 49 deletions
+4 -12
View File
@@ -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);
+2 -2
View File
@@ -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);
+2 -1
View File
@@ -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);
}
+22 -11
View File
@@ -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, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
content = content.replace(/^&gt;(.*)/gm, '<span class="greentext">&gt;$1</span>');
@@ -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) {
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = 'w0bm-pwa-v9';
const CACHE_NAME = 'f0ckm-pwa';
const ASSETS_TO_CACHE = [
'/',
'/s/css/f0ckm.css',