25 Commits
dev ... ts

Author SHA1 Message Date
x
1a491df018 Adding polticis and news to banned content
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 15s
2025-03-04 21:02:59 +01:00
x
bf653b042e Remove annoying text-shadow on term theme
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 13s
2025-03-04 19:51:09 +01:00
x
1e4432ee1f l
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 12s
2025-01-24 07:35:03 +01:00
x
6df28b4c5f a
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 07:33:21 +01:00
x
5ec5fcfbf5 h
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 07:28:58 +01:00
x
c508f2008c removing hidden service from about
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 07:07:56 +01:00
x
7ba56d9012 blah
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 06:32:30 +01:00
2696c4aac4 disable endless swiping on smartphones
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 06:16:09 +01:00
7b56660cac login autofocus
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 05:48:09 +01:00
75cea742d7 Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 04:41:11 +00:00
b86b739d38 Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 04:21:00 +00:00
5fcd88b824 Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 01:05:45 +00:00
b12189c3e5 Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 00:58:26 +00:00
7399e0c74f Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 00:46:51 +00:00
0fb699996b Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 00:45:44 +00:00
a431795c27 Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 00:44:48 +00:00
408a55d1df Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 00:29:19 +00:00
e21f0e9940 Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 00:27:23 +00:00
c85c08140e Update views/snippets/navbar.html
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
adding class to span element for css identification purposes
2025-01-24 00:26:21 +00:00
b249a87166 Update public/s/css/f0ck.css
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 0s
2025-01-24 00:21:13 +00:00
6a002feff5 alterf0cktive Art f0ck auf dem Mobilgerät zu nutzen
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 1s
2025-01-23 23:52:34 +00:00
6f23d5b904 fugg
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 16s
2025-01-09 11:49:29 +01:00
b997c1c530 remove last_action, nobody cares
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 16s
2025-01-09 10:58:06 +01:00
65be5dc3e8 current live version
Some checks failed
fetch npm modules / f0ck the f0cker (push) Failing after 1s
2024-12-28 12:43:34 +01:00
70df109d1b socks schmocks
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 19s
2024-08-09 12:57:19 +02:00
13 changed files with 156 additions and 39 deletions

View File

@ -5,6 +5,7 @@
"domain": "f0ck.dev",
"regex": "f0ck\\.dev"
},
"socks": "",
"maxfilesize": 83886080,
"adminmultiplier": 3.5,
"ignored": [

View File

@ -422,7 +422,6 @@ CREATE TABLE public.user_sessions (
browser character varying(255) NOT NULL,
created_at integer NOT NULL,
last_used integer NOT NULL,
last_action character varying(255) NOT NULL,
kmsi smallint DEFAULT '0'::smallint NOT NULL
);

View File

@ -463,6 +463,10 @@ html[theme="paper"] .login-form button[type="submit"] {
color: black;
}
html[theme="paper"] .btn.disabled {
text-shadow: 1px 1px 3px;
}
html[theme="atmos"] {
--accent: #1fb2b0;
--bg: #161618;
@ -581,10 +585,6 @@ html[theme="term"] span#favs {
border: 1px solid var(--black);
}
html[theme="term"] .metadata {
text-shadow: 0px 0px 1px var(--accent), 1px 0px 2px var(--accent), 0px 0px 5px var(--black);
}
html[theme="term"] .metadata>.badge-dark,
#themeselector {
box-shadow: var(--pagination-anchor-box-shadow);
@ -3015,4 +3015,135 @@ input#s_avatar {
#s_avatar:hover {
background: #ffffff0f;
}
/* nav ↓ (mobile) */
@media (max-width: 768px) {
body {
display: grid;
grid-template-rows: 1fr auto;
height: 100%;
}
.navbar.navbar-expand-lg {
grid-row-start: 2;
position: sticky;
bottom: 0;
}
.nav-link .user span {
visibility: hidden;
}
.navbar-nav {
display: grid !important;
grid-template-rows: 1fr;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
grid-gap: 0.25em;
}
.dropdown-menu {
position: absolute;
bottom: 30px;
top: unset;
}
.navbar-brand {
line-height: 1.5;
}
.navUserName {
display: none;
}
.container {
padding-top: 15px;
padding-bottom: 3em;
padding-left: 15px;
padding-right: 15px;
}
html {
height: 100%;
}
.err {
margin: unset;
width: unset;
}
.dropdown-menu {
list-style: none;
padding: 0;
min-width: 25vw;
border-left: 1px solid;
border-right: 1px solid;
border-bottom: 1px solid;
border-top: 1px solid;
border-color: var(--black);
margin-bottom: 0;
text-align: left;
box-shadow: 2px 3px 5px var(--black);
}
.dropdown-menu li {
padding-left: 6px;
}
.nav-link {
border-radius: 0;
}
.metadata {
grid-template-columns: auto;
}
button[data-skip="-10"] {
display: none;
}
button[data-skip="10"] {
display: none;
}
.v0ck_player_button {
font-family: monospace;
font-size: 12px;
}
tr {
display: grid;
grid-template-columns: auto 1fr;
}
tbody td {
box-shadow: none;
}
table tr td:nth-child(4) {
color: yellow;
font-size: xx-large;
font-family: 'VCR';
justify-content: center;
align-items: center;
align-self: center;
}
td:nth-child(1) {
grid-column: 1;
}
td:nth-child(2) {
grid-column: 2;
grid-row: 2;
}
td:nth-child(3) {
grid-column: 2;
grid-row: 1;
}
td:nth-child(4) {
grid-column: 3;
}
}

View File

@ -219,16 +219,6 @@ window.requestAnimFrame = (function(){
elem = document.querySelector(".pagination > .prev:not(.disabled)");
}
}
else {
if(Math.abs(swipeRT.yDiff) > swipeOpt.treshold && timeDiff < swipeOpt.timeout) {
if(navbar = document.querySelector("nav.navbar") && document.querySelector("div.posts")) {
if(swipeRT.yDiff > 0 && (window.innerHeight + window.scrollY) >= document.body.offsetHeight) // up
elem = document.querySelector(".pagination > .next:not(.disabled)");
else if(swipeRT.yDiff <= 0 && window.scrollY <= 0 && document.querySelector("div.posts")) // down
elem = document.querySelector(".pagination > .prev:not(.disabled)");
}
}
}
swipeRT.xDown = null;
swipeRT.yDown = null;

View File

@ -31,11 +31,11 @@ export default (router, tpl) => {
return res.reply({ body: "user doesn't exist or wrong password" });
const stamp = ~~(Date.now() / 1e3);
await db`
/*await db`
delete from user_sessions
where last_action <= ${(Date.now() - 6048e5)}
where last_used <= ${(Date.now() - 6048e5)}
and kmsi = 0
`;
`;*/
const session = lib.md5(lib.createID());
const blah = {
@ -44,13 +44,12 @@ export default (router, tpl) => {
browser: req.headers["user-agent"],
created_at: stamp,
last_used: stamp,
last_action: "/login",
kmsi: typeof req.post.kmsi !== 'undefined' ? 1 : 0
};
await db`
insert into "user_sessions" ${
db(blah, 'user_id', 'session', 'browser', 'created_at', 'last_used', 'last_action', 'kmsi')
db(blah, 'user_id', 'session', 'browser', 'created_at', 'last_used', 'kmsi')
}
`;

View File

@ -10,7 +10,7 @@ const auth = async (req, res, next) => {
};
export default (router, tpl) => {
router.get(/\/user\/(?<user>.*)/, async (req, res) => {
router.get(/\/user\/(?<user>.*)/, lib.loggedin, async (req, res) => {
const user = decodeURIComponent(req.params.user);
const query = await db`
@ -82,6 +82,9 @@ export default (router, tpl) => {
router.get(/^\/?(?:\/tag\/(?<tag>.+?))?(?:\/user\/(?<user>.+?)\/(?<mode>f0cks|favs))?(?:\/(?<mime>image|audio|video))?(?:\/p\/(?<page>\d+))?(?:\/(?<itemid>\d+))?$/, async (req, res) => {
const mode = req.params.itemid ? 'item' : 'index';
if(mode === 'item' && !req.session)
return res.redirect('/login');
const data = await (req.params.itemid ? f0cklib.getf0ck : f0cklib.getf0cks)({
user: req.params.user,
tag: req.params.tag,

View File

@ -1,8 +1,9 @@
import cfg from "../../inc/config.mjs";
import lib from "../lib.mjs";
import f0cklib from "../routeinc/f0cklib.mjs";
export default (router, tpl) => {
router.get(/^\/random$/, async (req, res) => {
router.get(/^\/random$/, lib.loggedin, async (req, res) => {
let referer = req.headers.referer ?? '';
let opts = {};

View File

@ -73,7 +73,7 @@ export default async bot => {
// is instagram
try {
// @flummi -> is there a variable for the actual work directory so it doesn't have to be hardcoded?
const meta = JSON.parse((await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout);
const meta = JSON.parse((await queue.exec(`yt-dlp --proxy ${cfg.main.socks} -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout);
ext = meta.ext;
} catch(err) {
const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"];
@ -88,7 +88,7 @@ export default async bot => {
else {
// is not instagram
try {
const meta = JSON.parse((await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout);
const meta = JSON.parse((await queue.exec(`yt-dlp --proxy ${cfg.main.socks} -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout);
ext = meta.ext;
} catch(err) {
const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"];
@ -112,7 +112,7 @@ export default async bot => {
if(link.match(regex.instagram)) {
try {
// add --cookies <path-to-cookies-file> on local instance if you want to avoid getting rate limited
source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim();
source = (await queue.exec(`yt-dlp --proxy ${cfg.main.socks} -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim();
} catch(err) {
if(e.type == 'tg')
return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error");
@ -122,7 +122,8 @@ export default async bot => {
else if(link.match(regex.imgur)) {
// imghure via torsocks
try {
await queue.exec(`torsocks wget ${link} -O ./tmp/${uuid}.${ext}`);
//await queue.exec(`torsocks wget ${link} -O ./tmp/${uuid}.${ext}`);
await queue.exec(`curl -x ${cfg.main.socks} ${link} --output ./tmp/${uuid}.${ext}`);
source = `./tmp/${uuid}.${ext}`;
} catch(err) {
console.error('err:', err);
@ -133,7 +134,7 @@ export default async bot => {
}
else {
try {
source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim();
source = (await queue.exec(`yt-dlp --proxy ${cfg.main.socks} -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim();
} catch(err) {
console.error('err:', err);
if(e.type == 'tg')

View File

@ -94,9 +94,8 @@ process.on('unhandledRejection', err => {
update "user_sessions" set ${
db({
last_used: ~~(Date.now() / 1e3),
last_action: req.url.pathname,
browser: req.headers['user-agent']
}, 'last_used', 'last_action', 'browser')
}, 'last_used', 'browser')
}
where id = ${+user[0].sess_id}
`;

View File

@ -26,7 +26,7 @@
<ul>
<li>You must be 18 years or older to visit or post</li>
<li>You shall not post animal cruelty, we like our animals alive and well, living a happy life until they are ready for our Schnitzel!</li>
<li>You shall not post under <b>ANY</b> circumstances: Snuff, Beastiality, Rape, Terrorist stuff (Beheadings, First person shootings, warcrimes), Childporn, Childmodeling</li>
<li>You shall not post under <b>ANY</b> circumstances: Snuff, Beastiality, Rape, Terrorist stuff (Beheadings, First person shootings, warcrimes), Politics, News, Childporn, Childmodeling</li>
</ul>
<h5>f0cked up?</h5>
<p>To have something removed in case you accidentally f0cked something that actually shouldn't be f0cked you can always contact the admins either via IRC or Email</p>
@ -38,11 +38,6 @@
<p>f0ck is developed and tested for Firefox and Chromium in their latest versions</p>
<p>If you encounter bugs please report them so we can fix them.</p>
<p>Microsoft Edgy is not actively supported, but if it werks, great! Same for anything apple related.</p>
<h5>Tinfoil f0ckers listen!</h5>
<p>f0ck onions and moons, but fockulite!</p>
<p>http://fockmoonsb24iczs7odozzy5uktlzbcgp337nabrgffzxv5ihabgpvyd.onion</p>
<p>http://fockulite74atso2xsxxw6q2gzqrgck572tiwvkyf5vdxictjn2vmlyd.onion</p>
<p>f0ck is completely functional without javascript enabled, you can be the beardiest neckbeard of all, we got you m'gentleman, if you want to use a custom theme you gotta allow our style cookie.</p>
<h5>f0ck Privacy?</h5>
<p>Cookies: Yes, we set 1 cookie for your prefered stylesheet, this is a optional cookie and not required for the site to function, simply cosmetics, you can block this cookie and the site will still work as intended and will default to the default f0ck theme called "f0ck"</p>
<p>Logs: We do not log users accessing our website.</p>

View File

@ -10,7 +10,6 @@
<td>browser</td>
<td>created_at</td>
<td>last_used</td>
<td>last_action</td>
</tr>
</thead>
<tbody>
@ -23,7 +22,6 @@
<td>{{ session.browser }}</td>
<td>{{ new Date(session.created_at * 1e3).toLocaleString("de-DE") }}</td>
<td>{{ new Date(session.last_used * 1e3).toLocaleString("de-DE") }}</td>
<td>{{ session.last_action }}</td>
</tr>
@endeach
</tbody>

View File

@ -9,7 +9,7 @@
<body type="login">
<form class="login-form" method="post" action="/login">
<p><a href="/"><img src="/s/img/f0ck_small.png" /></a></p>
<input type="text" name="username" placeholder="username" autocomplete="off" required />
<input type="text" name="username" placeholder="username" autocomplete="off" autofocus required />
<input type="password" name="password" placeholder="password" autocomplete="off" required />
<p><input type="checkbox" id="kmsi" name="kmsi" /> <label for="kmsi">stay signed in</label></p>
<button type="submit">Login</button>

View File

@ -5,7 +5,7 @@
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link user" href="#" content="{{ session.user }}" data-toggle="dropdown">
<img src="@if(session.avatar)/t/{{ session.avatar }}.webp@else/s/img/ava/default.png@endif" class="avatar"><span>@if(session.admin)&#11088;&nbsp;@endif{{ session.user }}</span>
<img src="@if(session.avatar)/t/{{ session.avatar }}.webp@else/s/img/ava/default.png@endif" class="avatar"><span class="navUserName">@if(session.admin)&#11088;&nbsp;@endif{{ session.user }}</span>
</a>
<ul class="dropdown-menu">
<li><a href="/user/{{ session.user.toLowerCase() }}">my profile</a></li>