Compare commits
47 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c46fcd0d9b | ||
|
e818e902f4 | ||
|
daf8faeb8f | ||
|
e822f118c6 | ||
|
b964a71c7a | ||
|
23a62d3803 | ||
|
ed264661a2 | ||
|
3e2aa4dca4 | ||
|
891129ec2e | ||
|
2863065939 | ||
|
cd88cfe3b1 | ||
|
161cb76709 | ||
|
8991218271 | ||
|
0b81e584a1 | ||
|
0aae17f871 | ||
|
3ca5b5d598 | ||
|
c4dfd6b5c6 | ||
|
e24f3f9e35 | ||
|
ba7ea955c5 | ||
|
1d5225c9fe | ||
|
356b8eebf1 | ||
|
f5e2bd4a02 | ||
|
9da30ac7d2 | ||
|
69ca852379 | ||
|
b29537d6d8 | ||
|
cfddf8a274 | ||
|
7a8362bca6 | ||
|
817c9c2966 | ||
|
7078378c05 | ||
|
76f1a3ddbb | ||
|
a905b8817e | ||
|
ab2ea14891 | ||
|
d33168ca92 | ||
|
e3cda9faf4 | ||
|
7d8baa1da3 | ||
|
dacd72ffb3 | ||
|
5e735f072d | ||
|
32712cf70c | ||
|
d02b304728 | ||
|
ad6027ab20 | ||
|
4416867ffe | ||
|
1a033723c8 | ||
|
a504865a6e | ||
|
b6f28fdb58 | ||
7028d92d5e | |||
c1f06de7c5 | |||
ce7f854dd6 |
@ -5,7 +5,6 @@
|
|||||||
"domain": "f0ck.dev",
|
"domain": "f0ck.dev",
|
||||||
"regex": "f0ck\\.dev"
|
"regex": "f0ck\\.dev"
|
||||||
},
|
},
|
||||||
"socks": "",
|
|
||||||
"maxfilesize": 83886080,
|
"maxfilesize": 83886080,
|
||||||
"adminmultiplier": 3.5,
|
"adminmultiplier": 3.5,
|
||||||
"ignored": [
|
"ignored": [
|
||||||
|
@ -19,7 +19,7 @@ let items;
|
|||||||
if(_itemid > 0)
|
if(_itemid > 0)
|
||||||
items = await sql('items').where('id', _itemid);
|
items = await sql('items').where('id', _itemid);
|
||||||
else
|
else
|
||||||
items = await sql('items').orderBy('id', 'asc').where('src', 'like', '%soundcloud%').where('mime', 'like', 'audio/%');
|
items = await sql`select id, dest, mime, src from "items"`;
|
||||||
let count = 1;
|
let count = 1;
|
||||||
let total = items.length;
|
let total = items.length;
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ for(let item of items) {
|
|||||||
if(mime.startsWith('video/') || mime == 'image/gif')
|
if(mime.startsWith('video/') || mime == 'image/gif')
|
||||||
await exec(`ffmpegthumbnailer -i./public/b/${filename} -s1024 -o./tmp/${itemid}.png`);
|
await exec(`ffmpegthumbnailer -i./public/b/${filename} -s1024 -o./tmp/${itemid}.png`);
|
||||||
else if(mime.startsWith('image/') && mime != 'image/gif')
|
else if(mime.startsWith('image/') && mime != 'image/gif')
|
||||||
await exec(`convert ./public/b/${filename} ./tmp/${itemid}.png`);
|
await exec(`magick ./public/b/${filename} ./tmp/${itemid}.png`);
|
||||||
else if(mime.startsWith('audio/')) {
|
else if(mime.startsWith('audio/')) {
|
||||||
if(link.match(/soundcloud/)) {
|
if(link.match(/soundcloud/)) {
|
||||||
let cover = (await exec(`yt-dlp --get-thumbnail "${link}"`)).stdout.trim();
|
let cover = (await exec(`yt-dlp --get-thumbnail "${link}"`)).stdout.trim();
|
||||||
@ -42,8 +42,8 @@ for(let item of items) {
|
|||||||
await exec(`wget "${cover}" -O ./tmp/${itemid}.jpg`);
|
await exec(`wget "${cover}" -O ./tmp/${itemid}.jpg`);
|
||||||
const size = (await fs.promises.stat(`./tmp/${itemid}.jpg`)).size;
|
const size = (await fs.promises.stat(`./tmp/${itemid}.jpg`)).size;
|
||||||
if(size >= 0) {
|
if(size >= 0) {
|
||||||
await exec(`convert ./tmp/${itemid}.jpg ./tmp/${itemid}.png`);
|
await exec(`magick ./tmp/${itemid}.jpg ./tmp/${itemid}.png`);
|
||||||
await exec(`convert ./tmp/${itemid}.jpg ./public/ca/${itemid}.webp`);
|
await exec(`magick ./tmp/${itemid}.jpg ./public/ca/${itemid}.webp`);
|
||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
//console.log(err);
|
//console.log(err);
|
||||||
@ -51,21 +51,21 @@ for(let item of items) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await exec(`ffmpeg -i ./public/b/${filename} -update 1 -map 0:v -map 0:1 -c copy ./tmp/${itemid}.png`);
|
await exec(`ffmpeg -i ./public/b/${filename} -update 1 -map 0:v -map 0:1 -c copy ./tmp/${itemid}.png`);
|
||||||
await exec(`convert ./tmp/${itemid}.png ./public/ca/${itemid}.webp`);
|
await exec(`magick ./tmp/${itemid}.png ./public/ca/${itemid}.webp`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await exec(`ffmpeg -i ./public/b/${filename} -update 1 -map 0:v -map 0:1 -c copy ./tmp/${itemid}.png`);
|
await exec(`ffmpeg -i ./public/b/${filename} -update 1 -map 0:v -map 0:1 -c copy ./tmp/${itemid}.png`);
|
||||||
await exec(`convert ./tmp/${itemid}.png ./public/ca/${itemid}.webp`);
|
await exec(`magick ./tmp/${itemid}.png ./public/ca/${itemid}.webp`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await exec(`convert "./tmp/${itemid}.png" -resize "128x128^" -gravity center -crop 128x128+0+0 +repage ./public/t/${itemid}.webp`);
|
await exec(`magick "./tmp/${itemid}.png" -resize "128x128^" -gravity center -crop 128x128+0+0 +repage ./public/t/${itemid}.webp`);
|
||||||
await fs.promises.unlink(`./tmp/${itemid}.png`).catch(err => {});
|
await fs.promises.unlink(`./tmp/${itemid}.png`).catch(err => {});
|
||||||
await fs.promises.unlink(`./tmp/${itemid}.jpg`).catch(err => {});
|
await fs.promises.unlink(`./tmp/${itemid}.jpg`).catch(err => {});
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
//console.log(err);
|
//console.log(err);
|
||||||
await exec(`convert ./mugge.png ./public/t/${itemid}.webp`);
|
await exec(`magick ./mugge.png ./public/t/${itemid}.webp`);
|
||||||
}
|
}
|
||||||
console.log(`current: ${itemid} (${count} / ${total})`);
|
console.log(`current: ${itemid} (${count} / ${total})`);
|
||||||
count++;
|
count++;
|
||||||
@ -76,7 +76,7 @@ for(let item of items) {
|
|||||||
const itemid = item.id;
|
const itemid = item.id;
|
||||||
const filename = item.dest;
|
const filename = item.dest;
|
||||||
await exec(`ffmpegthumbnailer -i./public/b/${filename} -s1024 -o./debug/tmp/${itemid}`);
|
await exec(`ffmpegthumbnailer -i./public/b/${filename} -s1024 -o./debug/tmp/${itemid}`);
|
||||||
await exec(`convert "./debug/tmp/${itemid}" -resize "128x128^" -gravity center -crop 128x128+0+0 +repage ./public/t/${itemid}.png`);
|
await exec(`magick "./debug/tmp/${itemid}" -resize "128x128^" -gravity center -crop 128x128+0+0 +repage ./public/t/${itemid}.png`);
|
||||||
await fs.unlink(`./debug/tmp/${itemid}`);
|
await fs.unlink(`./debug/tmp/${itemid}`);
|
||||||
console.log(`current: ${itemid} (${count} / ${total})`);
|
console.log(`current: ${itemid} (${count} / ${total})`);
|
||||||
} catch(err) {}
|
} catch(err) {}
|
||||||
|
7
f0ck.sql
7
f0ck.sql
@ -17,13 +17,13 @@ SET client_min_messages = warning;
|
|||||||
SET row_security = off;
|
SET row_security = off;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
|
-- Name: public; Type: SCHEMA; Schema: -; Owner: f0ck
|
||||||
--
|
--
|
||||||
|
|
||||||
-- *not* creating schema, since initdb creates it
|
-- *not* creating schema, since initdb creates it
|
||||||
|
|
||||||
|
|
||||||
ALTER SCHEMA public OWNER TO postgres;
|
ALTER SCHEMA public OWNER TO f0ck;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: unaccent; Type: EXTENSION; Schema: -; Owner: -
|
-- Name: unaccent; Type: EXTENSION; Schema: -; Owner: -
|
||||||
@ -422,6 +422,7 @@ CREATE TABLE public.user_sessions (
|
|||||||
browser character varying(255) NOT NULL,
|
browser character varying(255) NOT NULL,
|
||||||
created_at integer NOT NULL,
|
created_at integer NOT NULL,
|
||||||
last_used integer NOT NULL,
|
last_used integer NOT NULL,
|
||||||
|
last_action character varying(255) NOT NULL,
|
||||||
kmsi smallint DEFAULT '0'::smallint NOT NULL
|
kmsi smallint DEFAULT '0'::smallint NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -663,7 +664,7 @@ ALTER TABLE ONLY public.user_sessions
|
|||||||
CREATE PUBLICATION alltables FOR ALL TABLES WITH (publish = 'insert, update, delete, truncate');
|
CREATE PUBLICATION alltables FOR ALL TABLES WITH (publish = 'insert, update, delete, truncate');
|
||||||
|
|
||||||
|
|
||||||
ALTER PUBLICATION alltables OWNER TO postgres;
|
ALTER PUBLICATION alltables OWNER TO f0ck;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
|
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
|
||||||
|
133
package-lock.json
generated
133
package-lock.json
generated
@ -12,7 +12,6 @@
|
|||||||
"cuffeo": "^1.2.2",
|
"cuffeo": "^1.2.2",
|
||||||
"flumm-fetch": "^1.0.1",
|
"flumm-fetch": "^1.0.1",
|
||||||
"flummpress": "^2.0.5",
|
"flummpress": "^2.0.5",
|
||||||
"node-fetch": "^3.3.2",
|
|
||||||
"postgres": "^3.3.4"
|
"postgres": "^3.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -24,38 +23,6 @@
|
|||||||
"flumm-fetch": "^1.0.1"
|
"flumm-fetch": "^1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/data-uri-to-buffer": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
|
||||||
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/fetch-blob": {
|
|
||||||
"version": "3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
|
|
||||||
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/jimmywarting"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "paypal",
|
|
||||||
"url": "https://paypal.me/jimmywarting"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"node-domexception": "^1.0.0",
|
|
||||||
"web-streams-polyfill": "^3.0.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^12.20 || >= 14.13"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/flumm-fetch": {
|
"node_modules/flumm-fetch": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/flumm-fetch/-/flumm-fetch-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/flumm-fetch/-/flumm-fetch-1.0.1.tgz",
|
||||||
@ -66,55 +33,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/flummpress/-/flummpress-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/flummpress/-/flummpress-2.0.5.tgz",
|
||||||
"integrity": "sha512-C/8Im6OvoZw67q9DvYIXKjKr28zHYLJdH4DucQ6zpVbN1eWPySmxkJTURbkq3uEwABXLngXLifS6mjxAC++umQ=="
|
"integrity": "sha512-C/8Im6OvoZw67q9DvYIXKjKr28zHYLJdH4DucQ6zpVbN1eWPySmxkJTURbkq3uEwABXLngXLifS6mjxAC++umQ=="
|
||||||
},
|
},
|
||||||
"node_modules/formdata-polyfill": {
|
|
||||||
"version": "4.0.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
|
|
||||||
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"fetch-blob": "^3.1.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.20.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/node-domexception": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/jimmywarting"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://paypal.me/jimmywarting"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.5.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/node-fetch": {
|
|
||||||
"version": "3.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
|
|
||||||
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"data-uri-to-buffer": "^4.0.0",
|
|
||||||
"fetch-blob": "^3.1.4",
|
|
||||||
"formdata-polyfill": "^4.0.10"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/node-fetch"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/postgres": {
|
"node_modules/postgres": {
|
||||||
"version": "3.3.4",
|
"version": "3.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/postgres/-/postgres-3.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/postgres/-/postgres-3.3.4.tgz",
|
||||||
@ -123,15 +41,6 @@
|
|||||||
"type": "individual",
|
"type": "individual",
|
||||||
"url": "https://github.com/sponsors/porsager"
|
"url": "https://github.com/sponsors/porsager"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"node_modules/web-streams-polyfill": {
|
|
||||||
"version": "3.3.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
|
|
||||||
"integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 8"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -143,20 +52,6 @@
|
|||||||
"flumm-fetch": "^1.0.1"
|
"flumm-fetch": "^1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"data-uri-to-buffer": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
|
||||||
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="
|
|
||||||
},
|
|
||||||
"fetch-blob": {
|
|
||||||
"version": "3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
|
|
||||||
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
|
|
||||||
"requires": {
|
|
||||||
"node-domexception": "^1.0.0",
|
|
||||||
"web-streams-polyfill": "^3.0.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flumm-fetch": {
|
"flumm-fetch": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/flumm-fetch/-/flumm-fetch-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/flumm-fetch/-/flumm-fetch-1.0.1.tgz",
|
||||||
@ -167,38 +62,10 @@
|
|||||||
"resolved": "https://registry.npmjs.org/flummpress/-/flummpress-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/flummpress/-/flummpress-2.0.5.tgz",
|
||||||
"integrity": "sha512-C/8Im6OvoZw67q9DvYIXKjKr28zHYLJdH4DucQ6zpVbN1eWPySmxkJTURbkq3uEwABXLngXLifS6mjxAC++umQ=="
|
"integrity": "sha512-C/8Im6OvoZw67q9DvYIXKjKr28zHYLJdH4DucQ6zpVbN1eWPySmxkJTURbkq3uEwABXLngXLifS6mjxAC++umQ=="
|
||||||
},
|
},
|
||||||
"formdata-polyfill": {
|
|
||||||
"version": "4.0.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
|
|
||||||
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
|
|
||||||
"requires": {
|
|
||||||
"fetch-blob": "^3.1.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node-domexception": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
|
|
||||||
},
|
|
||||||
"node-fetch": {
|
|
||||||
"version": "3.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
|
|
||||||
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
|
|
||||||
"requires": {
|
|
||||||
"data-uri-to-buffer": "^4.0.0",
|
|
||||||
"fetch-blob": "^3.1.4",
|
|
||||||
"formdata-polyfill": "^4.0.10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"postgres": {
|
"postgres": {
|
||||||
"version": "3.3.4",
|
"version": "3.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/postgres/-/postgres-3.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/postgres/-/postgres-3.3.4.tgz",
|
||||||
"integrity": "sha512-XVu0+d/Y56pl2lSaf0c7V19AhAEfpVrhID1IENWN8nf0xch6hFq6dAov5dtUX6ZD46wfr1TxvLhxLtV8WnNsOg=="
|
"integrity": "sha512-XVu0+d/Y56pl2lSaf0c7V19AhAEfpVrhID1IENWN8nf0xch6hFq6dAov5dtUX6ZD46wfr1TxvLhxLtV8WnNsOg=="
|
||||||
},
|
|
||||||
"web-streams-polyfill": {
|
|
||||||
"version": "3.3.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
|
|
||||||
"integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
"cuffeo": "^1.2.2",
|
"cuffeo": "^1.2.2",
|
||||||
"flumm-fetch": "^1.0.1",
|
"flumm-fetch": "^1.0.1",
|
||||||
"flummpress": "^2.0.5",
|
"flummpress": "^2.0.5",
|
||||||
"node-fetch": "^3.3.2",
|
|
||||||
"postgres": "^3.3.4"
|
"postgres": "^3.3.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ html[theme='p1nk'] {
|
|||||||
--black: #000;
|
--black: #000;
|
||||||
--white: #fff;
|
--white: #fff;
|
||||||
--gray: #262626;
|
--gray: #262626;
|
||||||
--nav-bg: #2b2b2b;
|
--nav-bg: #201f1f;
|
||||||
--nav-brand-border: inset 1px #242424;
|
--nav-brand-border: inset 1px #242424;
|
||||||
--nav-brand-bg: #171717;
|
--nav-brand-bg: #171717;
|
||||||
--navigation-links-bg: #201f1f;
|
--navigation-links-bg: #201f1f;
|
||||||
@ -463,10 +463,6 @@ html[theme="paper"] .login-form button[type="submit"] {
|
|||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[theme="paper"] .btn.disabled {
|
|
||||||
text-shadow: 1px 1px 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[theme="atmos"] {
|
html[theme="atmos"] {
|
||||||
--accent: #1fb2b0;
|
--accent: #1fb2b0;
|
||||||
--bg: #161618;
|
--bg: #161618;
|
||||||
@ -498,7 +494,7 @@ html[theme="atmos"] {
|
|||||||
--posts-meta-bg: #000000b8;
|
--posts-meta-bg: #000000b8;
|
||||||
--badge-sfw: #68a728;
|
--badge-sfw: #68a728;
|
||||||
--badge-nsfw: #a72828;
|
--badge-nsfw: #a72828;
|
||||||
--badge-tag: #090909;
|
--badge-tag: #353535;
|
||||||
--scrollbar-color: #2b2b2b;
|
--scrollbar-color: #2b2b2b;
|
||||||
--footbar-color: #1fb2b0;
|
--footbar-color: #1fb2b0;
|
||||||
--loading-indicator-color: #1fb2b0;
|
--loading-indicator-color: #1fb2b0;
|
||||||
@ -585,6 +581,10 @@ html[theme="term"] span#favs {
|
|||||||
border: 1px solid var(--black);
|
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,
|
html[theme="term"] .metadata>.badge-dark,
|
||||||
#themeselector {
|
#themeselector {
|
||||||
box-shadow: var(--pagination-anchor-box-shadow);
|
box-shadow: var(--pagination-anchor-box-shadow);
|
||||||
@ -1618,9 +1618,10 @@ span.placeholder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1325px) {
|
@media (max-width: 1325px) {
|
||||||
.ranking {
|
/* ranking page - idea */
|
||||||
|
/* .ranking {
|
||||||
grid-template-columns: 1fr 1fr !important;
|
grid-template-columns: 1fr 1fr !important;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.by-user,
|
.by-user,
|
||||||
.by-stats,
|
.by-stats,
|
||||||
@ -2401,7 +2402,7 @@ table.table tbody tr:nth-of-type(odd) {
|
|||||||
.ranking {
|
.ranking {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto;
|
grid-template-columns: auto;
|
||||||
justify-content: center;
|
/* justify-content: center; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.ranking div {
|
.ranking div {
|
||||||
@ -2414,15 +2415,15 @@ table.table tbody tr:nth-of-type(odd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.by-user {
|
.by-user {
|
||||||
grid-column: 1;
|
grid-row: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.by-stats {
|
.by-stats {
|
||||||
grid-column: 3;
|
grid-row: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.by-hoster {
|
.by-hoster {
|
||||||
grid-column: 2;
|
grid-row: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tags */
|
/* tags */
|
||||||
@ -3016,134 +3017,7 @@ input#s_avatar {
|
|||||||
#s_avatar:hover {
|
#s_avatar:hover {
|
||||||
background: #ffffff0f;
|
background: #ffffff0f;
|
||||||
}
|
}
|
||||||
|
.theforceofthree {
|
||||||
/* nav ↓ (mobile) */
|
display: grid;
|
||||||
@media (max-width: 768px) {
|
grid-template-columns: 0.4fr 1fr 0.4fr;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
151
public/s/css/w0bm.css
Normal file
151
public/s/css/w0bm.css
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
.navbar-brand {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-brand {
|
||||||
|
width: 5cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kontrollelement {
|
||||||
|
grid-column: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metadata {
|
||||||
|
grid-template-columns: 0.4fr auto 0.4fr;
|
||||||
|
grid-template-rows: auto 1fr;
|
||||||
|
background-color: transparent !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[theme="f0ck95d"] .badge-dark {
|
||||||
|
border: none;
|
||||||
|
background-image: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.steuerung {
|
||||||
|
font-size:x-large;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.steuerung a {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blahlol {
|
||||||
|
grid-column: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
span#favs {
|
||||||
|
background: transparent !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-dark, #themeselector {
|
||||||
|
background-color: unset;
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
._204863 {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
background-color: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[theme="iced"] ._204863 {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.media-object {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.v0ck {
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.v0ck_overlay {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .wrapper {
|
||||||
|
height: 100%;
|
||||||
|
display: grid;
|
||||||
|
justify-content: right;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-rows: auto auto auto;
|
||||||
|
width: 100%;
|
||||||
|
background: #14755e0a;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main {
|
||||||
|
grid-row: 2;
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
html[theme="term"] .image-brand {
|
||||||
|
filter: hue-rotate(-50deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
html[theme="f0ck"] .image-brand {
|
||||||
|
filter: hue-rotate(-50deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
html[theme="p1nk"] .image-brand {
|
||||||
|
filter: hue-rotate(150deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
html[theme="orange"] .image-brand {
|
||||||
|
filter: hue-rotate(-160deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.v0ck_overlay {
|
||||||
|
background-color: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
.tags { grid-template-columns: repeat(2, 1fr); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 900px) {
|
||||||
|
.tags { grid-template-columns: repeat(3, 1fr); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
box-shadow: 1px 1px 1px black;
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: auto;
|
||||||
|
grid-template-columns: 1fr auto;
|
||||||
|
margin: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigation-rechts {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about {
|
||||||
|
background: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-image {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tos {
|
||||||
|
margin: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link[data-toggle="dropdown"]::after {
|
||||||
|
content: "" !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu.shii {
|
||||||
|
width: auto;
|
||||||
|
}
|
BIN
public/s/img/cockfag.png
Normal file
BIN
public/s/img/cockfag.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 68 KiB |
BIN
public/s/img/w0bm_mosh_banner_by_marderchen.gif
Normal file
BIN
public/s/img/w0bm_mosh_banner_by_marderchen.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 824 KiB |
@ -338,7 +338,7 @@ const flash = ({ type, msg }) => {
|
|||||||
document.querySelector("svg#a_favo").addEventListener("click", toggleFavEvent);
|
document.querySelector("svg#a_favo").addEventListener("click", toggleFavEvent);
|
||||||
|
|
||||||
document.addEventListener("keyup", e => {
|
document.addEventListener("keyup", e => {
|
||||||
if(e.target.tagName === "INPUT")
|
if(e.target.tagName === "INPUT" || e.target.tagName === "TEXTAREA")
|
||||||
return;
|
return;
|
||||||
if(e.key === "p")
|
if(e.key === "p")
|
||||||
toggleEvent();
|
toggleEvent();
|
||||||
|
@ -11,7 +11,7 @@ window.requestAnimFrame = (function(){
|
|||||||
if(elem = document.querySelector("#my-video")) {
|
if(elem = document.querySelector("#my-video")) {
|
||||||
video = new v0ck(elem);
|
video = new v0ck(elem);
|
||||||
document.addEventListener("keydown", e => {
|
document.addEventListener("keydown", e => {
|
||||||
if(e.key === " " && e.target.tagName !== "INPUT") {
|
if(e.key === " " && e.target.tagName !== "INPUT" && e.target.tagName !== "TEXTAREA") {
|
||||||
video[video.paused ? 'play' : 'pause']();
|
video[video.paused ? 'play' : 'pause']();
|
||||||
document.querySelector('.v0ck_overlay').classList[video.paused ? 'remove' : 'add']('v0ck_hidden');
|
document.querySelector('.v0ck_overlay').classList[video.paused ? 'remove' : 'add']('v0ck_hidden');
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ window.requestAnimFrame = (function(){
|
|||||||
" ": clickOnElementBinding("#f0ck-image")
|
" ": clickOnElementBinding("#f0ck-image")
|
||||||
};
|
};
|
||||||
document.addEventListener("keydown", e => {
|
document.addEventListener("keydown", e => {
|
||||||
if(e.key in keybindings && e.target.tagName !== "INPUT") {
|
if(e.key in keybindings && e.target.tagName !== "INPUT" && e.target.tagName !== "TEXTAREA") {
|
||||||
if(e.shiftKey || e.ctrlKey || e.metaKey || e.altKey)
|
if(e.shiftKey || e.ctrlKey || e.metaKey || e.altKey)
|
||||||
return;
|
return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -219,6 +219,16 @@ window.requestAnimFrame = (function(){
|
|||||||
elem = document.querySelector(".pagination > .prev:not(.disabled)");
|
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.xDown = null;
|
||||||
swipeRT.yDown = null;
|
swipeRT.yDown = null;
|
||||||
|
@ -15,7 +15,7 @@ const Cookie = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
(() => {
|
(() => {
|
||||||
const acttheme = Cookie.get('theme') ?? "f0ck";
|
const acttheme = Cookie.get('theme') ?? "w0bm";
|
||||||
const themecontainer = document.querySelector("li#themes > ul.dropdown-menu");
|
const themecontainer = document.querySelector("li#themes > ul.dropdown-menu");
|
||||||
const themes = [...themecontainer.querySelectorAll("li > a")].map(t => t.innerText.toLowerCase());
|
const themes = [...themecontainer.querySelectorAll("li > a")].map(t => t.innerText.toLowerCase());
|
||||||
if(acttheme !== document.documentElement.getAttribute("theme") && themes.includes(acttheme))
|
if(acttheme !== document.documentElement.getAttribute("theme") && themes.includes(acttheme))
|
||||||
@ -30,9 +30,9 @@ const Cookie = {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
document.addEventListener("keydown", e => {
|
document.addEventListener("keydown", e => {
|
||||||
if(e.target.tagName === "INPUT")
|
if(e.target.tagName === "INPUT" || e.target.tagName === "TEXTAREA")
|
||||||
return;
|
return;
|
||||||
const acttheme = Cookie.get('theme') ?? "f0ck";
|
const acttheme = Cookie.get('theme') ?? "w0bm";
|
||||||
const themes = [...themecontainer.querySelectorAll("li > a")].map(t => t.innerText.toLowerCase());
|
const themes = [...themecontainer.querySelectorAll("li > a")].map(t => t.innerText.toLowerCase());
|
||||||
const k = e.key;
|
const k = e.key;
|
||||||
if(k === "t") {
|
if(k === "t") {
|
||||||
|
@ -149,16 +149,8 @@ class v0ck {
|
|||||||
|
|
||||||
player.addEventListener('click', e => {
|
player.addEventListener('click', e => {
|
||||||
const path = e.path || (e.composedPath && e.composedPath());
|
const path = e.path || (e.composedPath && e.composedPath());
|
||||||
if(path.filter(f => f.classList?.contains('v0ck_player_controls')).length)
|
if(!path.filter(f => f.classList?.contains('v0ck_player_controls')).length)
|
||||||
return;
|
togglePlay(e);
|
||||||
|
|
||||||
//navigator.userAgentData = { mobile: true };
|
|
||||||
if(navigator.userAgentData?.mobile) { // mobile
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
togglePlay(e);
|
|
||||||
});
|
});
|
||||||
toggle.addEventListener('click', togglePlay);
|
toggle.addEventListener('click', togglePlay);
|
||||||
video.addEventListener('play', updatePlayIcon);
|
video.addEventListener('play', updatePlayIcon);
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
import fetch from 'node-fetch';
|
import fetch from 'flumm-fetch';
|
||||||
import cfg from './config.mjs';
|
import cfg from './config.mjs';
|
||||||
|
|
||||||
const parseOutput = text => {
|
|
||||||
text = text.trim().toLowerCase();
|
|
||||||
return text.includes(', ')
|
|
||||||
? text.split(', ')
|
|
||||||
: text.replace(/\d\. /g, '').split('\n');
|
|
||||||
};
|
|
||||||
|
|
||||||
export default new class autotagger {
|
export default new class autotagger {
|
||||||
async isNSFW(filename, filesize) {
|
async isNSFW(filename, filesize) {
|
||||||
let opts = {
|
let opts = {
|
||||||
@ -36,34 +29,4 @@ export default new class autotagger {
|
|||||||
else
|
else
|
||||||
return res.unsafe;
|
return res.unsafe;
|
||||||
};
|
};
|
||||||
|
|
||||||
async getTags(id) {
|
|
||||||
if(!id)
|
|
||||||
return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
const f0ck = `${cfg.main.url.full}/t/${id}.webp`;
|
|
||||||
const blob = await (await fetch(f0ck)).arrayBuffer();
|
|
||||||
|
|
||||||
const res = await fetch(`${cfg.apis.cf.url}/${cfg.apis.cf.id}/ai/run/${cfg.apis.cf.model}`, {
|
|
||||||
method: "POST",
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
"Authorization": `Bearer ${cfg.apis.cf.key}`
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
image: [ ...new Uint8Array(blob) ],
|
|
||||||
prompt: "Generate eight comma separated tags without colors for this image.",
|
|
||||||
max_tokens: 128
|
|
||||||
})
|
|
||||||
});
|
|
||||||
const json = await res.json();
|
|
||||||
console.log(json.result.description);
|
|
||||||
return parseOutput(json.result.description);
|
|
||||||
} catch(err) {
|
|
||||||
return {
|
|
||||||
error: err.message || "unknown error"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -221,14 +221,14 @@ export default new class {
|
|||||||
return next();
|
return next();
|
||||||
};
|
};
|
||||||
|
|
||||||
async loggedin(req, res, next) {
|
async loggedin(req, res, next) {
|
||||||
if(!req.session) {
|
if(!req.session) {
|
||||||
return res.reply({
|
return res.reply({
|
||||||
code: 401,
|
code: 401,
|
||||||
body: "401 - Unauthorized"
|
body: "401 - Unauthorized"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return next();
|
return next();
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -62,7 +62,7 @@ export default new class queue {
|
|||||||
if(mime.startsWith('video/') || mime == 'image/gif')
|
if(mime.startsWith('video/') || mime == 'image/gif')
|
||||||
await this.exec(`ffmpegthumbnailer -i./public/b/${filename} -s1024 -o./tmp/${itemid}.png`);
|
await this.exec(`ffmpegthumbnailer -i./public/b/${filename} -s1024 -o./tmp/${itemid}.png`);
|
||||||
else if(mime.startsWith('image/') && mime != 'image/gif')
|
else if(mime.startsWith('image/') && mime != 'image/gif')
|
||||||
await this.exec(`convert "./public/b/${filename}[0]" ./tmp/${itemid}.png`);
|
await this.exec(`magick "./public/b/${filename}[0]" ./tmp/${itemid}.png`);
|
||||||
else if(mime.startsWith('audio/')) {
|
else if(mime.startsWith('audio/')) {
|
||||||
if(link.match(/soundcloud/)) {
|
if(link.match(/soundcloud/)) {
|
||||||
let cover = (await this.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --get-thumbnail "${link}"`)).stdout.trim();
|
let cover = (await this.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --get-thumbnail "${link}"`)).stdout.trim();
|
||||||
@ -72,23 +72,23 @@ export default new class queue {
|
|||||||
await this.exec(`wget "${cover}" -O ./tmp/${itemid}.jpg`);
|
await this.exec(`wget "${cover}" -O ./tmp/${itemid}.jpg`);
|
||||||
const size = (await fs.promises.stat(`./tmp/${itemid}.jpg`)).size;
|
const size = (await fs.promises.stat(`./tmp/${itemid}.jpg`)).size;
|
||||||
if(size >= 0) {
|
if(size >= 0) {
|
||||||
await this.exec(`convert ./tmp/${itemid}.jpg ./tmp/${itemid}.png`);
|
await this.exec(`magick ./tmp/${itemid}.jpg ./tmp/${itemid}.png`);
|
||||||
await this.exec(`convert ./tmp/${itemid}.jpg ./public/ca/${itemid}.webp`);
|
await this.exec(`magick ./tmp/${itemid}.jpg ./public/ca/${itemid}.webp`);
|
||||||
}
|
}
|
||||||
} catch(err) {}
|
} catch(err) {}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await this.exec(`ffmpeg -i ./public/b/${filename} -update 1 -map 0:v -map 0:1 -c copy ./tmp/${itemid}.png`);
|
await this.exec(`ffmpeg -i ./public/b/${filename} -update 1 -map 0:v -map 0:1 -c copy ./tmp/${itemid}.png`);
|
||||||
await this.exec(`convert ./tmp/${itemid}.png ./public/ca/${itemid}.webp`);
|
await this.exec(`magick ./tmp/${itemid}.png ./public/ca/${itemid}.webp`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await this.exec(`ffmpeg -i ./public/b/${filename} -update 1 -map 0:v -map 0:1 -c copy ./tmp/${itemid}.png`);
|
await this.exec(`ffmpeg -i ./public/b/${filename} -update 1 -map 0:v -map 0:1 -c copy ./tmp/${itemid}.png`);
|
||||||
await this.exec(`convert ./tmp/${itemid}.png ./public/ca/${itemid}.webp`);
|
await this.exec(`magick ./tmp/${itemid}.png ./public/ca/${itemid}.webp`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.exec(`convert "./tmp/${itemid}.png" -resize "128x128^" -gravity center -crop 128x128+0+0 +repage ./public/t/${itemid}.webp`);
|
await this.exec(`magick "./tmp/${itemid}.png" -resize "128x128^" -gravity center -crop 128x128+0+0 +repage ./public/t/${itemid}.webp`);
|
||||||
await fs.promises.unlink(`./tmp/${itemid}.png`).catch(_=>{});
|
await fs.promises.unlink(`./tmp/${itemid}.png`).catch(_=>{});
|
||||||
await fs.promises.unlink(`./tmp/${itemid}.jpg`).catch(_=>{});
|
await fs.promises.unlink(`./tmp/${itemid}.jpg`).catch(_=>{});
|
||||||
return true;
|
return true;
|
||||||
|
@ -166,7 +166,7 @@ export default {
|
|||||||
success: true,
|
success: true,
|
||||||
user: {
|
user: {
|
||||||
name: actitem.username,
|
name: actitem.username,
|
||||||
channel: actitem.usernetwork == "Telegram" && actitem.userchannel !== "f0ck.me" ? "anonymous" : actitem.userchannel,
|
channel: actitem.usernetwork == "Telegram" && actitem.userchannel !== "w0bm.com" ? "anonymous" : actitem.userchannel,
|
||||||
network: actitem.usernetwork
|
network: actitem.usernetwork
|
||||||
},
|
},
|
||||||
item: {
|
item: {
|
||||||
@ -187,7 +187,7 @@ export default {
|
|||||||
favorites: favorites,
|
favorites: favorites,
|
||||||
tags: tags
|
tags: tags
|
||||||
},
|
},
|
||||||
title: `${actitem.id} - f0ck.me`,
|
title: `${actitem.id} - w0bm.com`,
|
||||||
pagination: {
|
pagination: {
|
||||||
end: items[items.length - 1]?.id,
|
end: items[items.length - 1]?.id,
|
||||||
start: items[0]?.id,
|
start: items[0]?.id,
|
||||||
|
@ -31,11 +31,11 @@ export default (router, tpl) => {
|
|||||||
return res.reply({ body: "user doesn't exist or wrong password" });
|
return res.reply({ body: "user doesn't exist or wrong password" });
|
||||||
const stamp = ~~(Date.now() / 1e3);
|
const stamp = ~~(Date.now() / 1e3);
|
||||||
|
|
||||||
/*await db`
|
await db`
|
||||||
delete from user_sessions
|
delete from user_sessions
|
||||||
where last_used <= ${(Date.now() - 6048e5)}
|
where last_action <= ${(Date.now() - 6048e5)}
|
||||||
and kmsi = 0
|
and kmsi = 0
|
||||||
`;*/
|
`;
|
||||||
|
|
||||||
const session = lib.md5(lib.createID());
|
const session = lib.md5(lib.createID());
|
||||||
const blah = {
|
const blah = {
|
||||||
@ -44,12 +44,13 @@ export default (router, tpl) => {
|
|||||||
browser: req.headers["user-agent"],
|
browser: req.headers["user-agent"],
|
||||||
created_at: stamp,
|
created_at: stamp,
|
||||||
last_used: stamp,
|
last_used: stamp,
|
||||||
|
last_action: "/login",
|
||||||
kmsi: typeof req.post.kmsi !== 'undefined' ? 1 : 0
|
kmsi: typeof req.post.kmsi !== 'undefined' ? 1 : 0
|
||||||
};
|
};
|
||||||
|
|
||||||
await db`
|
await db`
|
||||||
insert into "user_sessions" ${
|
insert into "user_sessions" ${
|
||||||
db(blah, 'user_id', 'session', 'browser', 'created_at', 'last_used', 'kmsi')
|
db(blah, 'user_id', 'session', 'browser', 'created_at', 'last_used', 'last_action', 'kmsi')
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ const auth = async (req, res, next) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default (router, tpl) => {
|
export default (router, tpl) => {
|
||||||
router.get(/\/user\/(?<user>.*)/, lib.loggedin, async (req, res) => {
|
router.get(/\/user\/(?<user>.*)/, async (req, res) => {
|
||||||
const user = decodeURIComponent(req.params.user);
|
const user = decodeURIComponent(req.params.user);
|
||||||
|
|
||||||
const query = await db`
|
const query = await db`
|
||||||
@ -82,9 +82,6 @@ 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) => {
|
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';
|
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)({
|
const data = await (req.params.itemid ? f0cklib.getf0ck : f0cklib.getf0cks)({
|
||||||
user: req.params.user,
|
user: req.params.user,
|
||||||
tag: req.params.tag,
|
tag: req.params.tag,
|
||||||
@ -114,6 +111,12 @@ export default (router, tpl) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
router.get(/^\/(terms)$/, (req, res) => {
|
||||||
|
res.reply({
|
||||||
|
body: tpl.render(req.url.split[0], { tmp: null }, req)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
router.get(/^\/mode\/(\d)/, lib.loggedin, async (req, res) => {
|
router.get(/^\/mode\/(\d)/, lib.loggedin, async (req, res) => {
|
||||||
const mode = +req.url.split[1];
|
const mode = +req.url.split[1];
|
||||||
let referertmp = req.headers.referer;
|
let referertmp = req.headers.referer;
|
||||||
|
@ -3,13 +3,15 @@ import lib from "../lib.mjs";
|
|||||||
import f0cklib from "../routeinc/f0cklib.mjs";
|
import f0cklib from "../routeinc/f0cklib.mjs";
|
||||||
|
|
||||||
export default (router, tpl) => {
|
export default (router, tpl) => {
|
||||||
router.get(/^\/random$/, lib.loggedin, async (req, res) => {
|
router.get(/^\/random$/, async (req, res) => {
|
||||||
let referer = req.headers.referer ?? '';
|
let referer = req.headers.referer ?? '';
|
||||||
let opts = {};
|
let opts = {};
|
||||||
|
|
||||||
if(referer.match(new RegExp(cfg.main.url.regex))) { // parse referer
|
if(referer.match(new RegExp(cfg.main.url.regex))) { // parse referer
|
||||||
referer = referer.split(cfg.main.url.domain)[1];
|
referer = referer.split(cfg.main.url.domain)[1];
|
||||||
|
console.log("referer: ", referer);
|
||||||
const tmp = referer.match(/^\/?(?:\/tag\/(?<tag>.+?))?(?:\/user\/(?<user>.+?)\/(?<mode>f0cks|favs))?(?:\/(?<mime>image|audio|video))?(?:\/p\/(?<page>\d+))?(?:\/(?<itemid>\d+))?$/);
|
const tmp = referer.match(/^\/?(?:\/tag\/(?<tag>.+?))?(?:\/user\/(?<user>.+?)\/(?<mode>f0cks|favs))?(?:\/(?<mime>image|audio|video))?(?:\/p\/(?<page>\d+))?(?:\/(?<itemid>\d+))?$/);
|
||||||
|
console.log("tmp: ", tmp);
|
||||||
if(tmp)
|
if(tmp)
|
||||||
opts = tmp.groups;
|
opts = tmp.groups;
|
||||||
}
|
}
|
||||||
@ -23,6 +25,8 @@ export default (router, tpl) => {
|
|||||||
mode: req.session.mode,
|
mode: req.session.mode,
|
||||||
session: !!req.session
|
session: !!req.session
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("data", data);
|
||||||
|
|
||||||
if(!data.success) {
|
if(!data.success) {
|
||||||
return res.reply({
|
return res.reply({
|
||||||
|
30
src/inc/routes/toptags.mjs
Normal file
30
src/inc/routes/toptags.mjs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import db from "../../inc/sql.mjs";
|
||||||
|
import cfg from "../../inc/config.mjs";
|
||||||
|
import lib from "../../inc/lib.mjs";
|
||||||
|
import f0cklib from "../routeinc/f0cklib.mjs";
|
||||||
|
|
||||||
|
export default (router, tpl) => {
|
||||||
|
router.get(/^\/tags$/,lib.loggedin, async (req, res) => {
|
||||||
|
|
||||||
|
const phrase = cfg.websrv.phrases[~~(Math.random() * cfg.websrv.phrases.length)];
|
||||||
|
|
||||||
|
const toptags = await db`
|
||||||
|
SELECT t.id, t.tag, COUNT(DISTINCT ta.item_id) AS total_items
|
||||||
|
FROM tags t
|
||||||
|
LEFT JOIN tags_assign ta ON t.id = ta.tag_id
|
||||||
|
GROUP BY t.id, t.tag
|
||||||
|
ORDER BY total_items DESC
|
||||||
|
LIMIT 500
|
||||||
|
;
|
||||||
|
`;
|
||||||
|
|
||||||
|
res.reply({
|
||||||
|
body: tpl.render('tags', {
|
||||||
|
toptags,
|
||||||
|
phrase,
|
||||||
|
tmp: null
|
||||||
|
}, req)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return router;
|
||||||
|
};
|
@ -73,7 +73,7 @@ export default async bot => {
|
|||||||
// is instagram
|
// is instagram
|
||||||
try {
|
try {
|
||||||
// @flummi -> is there a variable for the actual work directory so it doesn't have to be hardcoded?
|
// @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 --proxy ${cfg.main.socks} -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 -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout);
|
||||||
ext = meta.ext;
|
ext = meta.ext;
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"];
|
const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"];
|
||||||
@ -88,7 +88,7 @@ export default async bot => {
|
|||||||
else {
|
else {
|
||||||
// is not instagram
|
// is not instagram
|
||||||
try {
|
try {
|
||||||
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);
|
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);
|
||||||
ext = meta.ext;
|
ext = meta.ext;
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"];
|
const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"];
|
||||||
@ -98,7 +98,6 @@ export default async bot => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!Object.values(cfg.mimes).includes(ext?.toLowerCase())) {
|
if(!Object.values(cfg.mimes).includes(ext?.toLowerCase())) {
|
||||||
await e.reply("mime schmime");
|
|
||||||
return console.log('mime schmime ' + ext);
|
return console.log('mime schmime ' + ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +112,7 @@ export default async bot => {
|
|||||||
if(link.match(regex.instagram)) {
|
if(link.match(regex.instagram)) {
|
||||||
try {
|
try {
|
||||||
// add --cookies <path-to-cookies-file> on local instance if you want to avoid getting rate limited
|
// add --cookies <path-to-cookies-file> on local instance if you want to avoid getting rate limited
|
||||||
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();
|
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();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
if(e.type == 'tg')
|
if(e.type == 'tg')
|
||||||
return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error");
|
return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error");
|
||||||
@ -123,8 +122,7 @@ export default async bot => {
|
|||||||
else if(link.match(regex.imgur)) {
|
else if(link.match(regex.imgur)) {
|
||||||
// imghure via torsocks
|
// imghure via torsocks
|
||||||
try {
|
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}`;
|
source = `./tmp/${uuid}.${ext}`;
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.error('err:', err);
|
console.error('err:', err);
|
||||||
@ -135,7 +133,7 @@ export default async bot => {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
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();
|
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();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.error('err:', err);
|
console.error('err:', err);
|
||||||
if(e.type == 'tg')
|
if(e.type == 'tg')
|
||||||
@ -249,18 +247,35 @@ export default async bot => {
|
|||||||
try {
|
try {
|
||||||
await queue.genThumbnail(filename, mime, itemid, link);
|
await queue.genThumbnail(filename, mime, itemid, link);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
await queue.exec(`convert ./mugge.png ./public/t/${itemid}.webp`);
|
await queue.exec(`magick ./mugge.png ./public/t/${itemid}.webp`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let speed = lib.calcSpeed(size, end);
|
let speed = lib.calcSpeed(size, end);
|
||||||
speed = !Number.isFinite(speed) ? "yes" : `${speed.toFixed(2)} Mbit/s`;
|
speed = !Number.isFinite(speed) ? "yes" : `${speed.toFixed(2)} Mbit/s`;
|
||||||
|
|
||||||
|
// autotagger
|
||||||
|
let tags = [];
|
||||||
|
/*if(cfg.apis?.nsfw1 && mime.startsWith('image')) {
|
||||||
|
const nsfw = await autotagger.isNSFW(filename, size);
|
||||||
|
tags.push(nsfw ? 'nsfw' : 'sfw');
|
||||||
|
if(nsfw)
|
||||||
|
await queue.tagNSFW(itemid);
|
||||||
|
else
|
||||||
|
await queue.tagSFW(itemid);
|
||||||
|
}*/
|
||||||
|
|
||||||
let outputmsgirc = `[f0cked] link: ${cfg.main.url.full}/${itemid} | size: ${lib.formatSize(size)} | speed: ${speed}`;
|
let outputmsgirc = `[f0cked] link: ${cfg.main.url.full}/${itemid} | size: ${lib.formatSize(size)} | speed: ${speed}`;
|
||||||
let outputmsgtg = `[f0cked] size: ${lib.formatSize(size)} | speed: ${speed}`;
|
let outputmsgtg = `[f0cked] size: ${lib.formatSize(size)} | speed: ${speed}`;
|
||||||
|
|
||||||
|
if(tags?.length > 0) {
|
||||||
|
const tagstr = tags.join(', ');
|
||||||
|
outputmsgirc += ` | tags: ${tagstr}`;
|
||||||
|
outputmsgtg += ` | tags: ${tagstr}`;
|
||||||
|
}
|
||||||
|
|
||||||
if(e.type == 'tg') {
|
if(e.type == 'tg') {
|
||||||
await e.deleteMessage(msg.result.chat.id, msg.result.message_id);
|
await e.deleteMessage(msg.result.chat.id, msg.result.message_id);
|
||||||
/*await e.reply(outputmsgtg, {
|
await e.reply(outputmsgtg, {
|
||||||
reply_markup: JSON.stringify({
|
reply_markup: JSON.stringify({
|
||||||
inline_keyboard: [[
|
inline_keyboard: [[
|
||||||
{ text: (await lib.hasTag(itemid, 1) ? '✓ ' : '') + 'sfw', callback_data: `b_sfw:${itemid}` },
|
{ text: (await lib.hasTag(itemid, 1) ? '✓ ' : '') + 'sfw', callback_data: `b_sfw:${itemid}` },
|
||||||
@ -271,42 +286,6 @@ export default async bot => {
|
|||||||
{ text: `open f0ck #${itemid}`, url: `${cfg.main.url.full}/${itemid}` }
|
{ text: `open f0ck #${itemid}`, url: `${cfg.main.url.full}/${itemid}` }
|
||||||
]]
|
]]
|
||||||
})
|
})
|
||||||
});*/
|
|
||||||
|
|
||||||
let tags;
|
|
||||||
|
|
||||||
try {
|
|
||||||
tags = (await autotagger.getTags(itemid))
|
|
||||||
.map(t => ({ text: t, callback_data: 'nope' }));
|
|
||||||
await e.reply(outputmsgtg, {
|
|
||||||
reply_markup: JSON.stringify({
|
|
||||||
inline_keyboard: [[
|
|
||||||
{ text: (await lib.hasTag(itemid, 1) ? '✓ ' : '') + 'sfw', callback_data: `b_sfw:${itemid}` },
|
|
||||||
{ text: (await lib.hasTag(itemid, 2) ? '✓ ' : '') + 'nsfw', callback_data: `b_nsfw:${itemid}` },
|
|
||||||
],
|
|
||||||
[ ...tags.splice(0, 4) ],
|
|
||||||
[ ...tags.splice(0, 4) ],
|
|
||||||
[
|
|
||||||
{ text: `open f0ck #${itemid}`, url: `${cfg.main.url.full}/${itemid}` },
|
|
||||||
{ text: '❌ delete', callback_data: `b_delete:${itemid}` }
|
|
||||||
]]
|
|
||||||
})
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
} catch(err) {
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
|
|
||||||
await e.reply(outputmsgtg, {
|
|
||||||
reply_markup: JSON.stringify({
|
|
||||||
inline_keyboard: [[
|
|
||||||
{ text: (await lib.hasTag(itemid, 1) ? '✓ ' : '') + 'sfw', callback_data: `b_sfw:${itemid}` },
|
|
||||||
{ text: (await lib.hasTag(itemid, 2) ? '✓ ' : '') + 'nsfw', callback_data: `b_nsfw:${itemid}` },
|
|
||||||
], [
|
|
||||||
{ text: `open f0ck #${itemid}`, url: `${cfg.main.url.full}/${itemid}` },
|
|
||||||
{ text: '❌ delete', callback_data: `b_delete:${itemid}` }
|
|
||||||
]]
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -66,7 +66,7 @@ process.on('unhandledRejection', err => {
|
|||||||
req.session = false;
|
req.session = false;
|
||||||
if(req.url.pathname.match(/^\/(s|b|t|ca)\//))
|
if(req.url.pathname.match(/^\/(s|b|t|ca)\//))
|
||||||
return;
|
return;
|
||||||
req.theme = req.cookies.theme || 'f0ck';
|
req.theme = req.cookies.theme || 'atmos';
|
||||||
req.fullscreen = req.cookies.fullscreen || 0;
|
req.fullscreen = req.cookies.fullscreen || 0;
|
||||||
|
|
||||||
if(req.cookies.session) {
|
if(req.cookies.session) {
|
||||||
@ -94,8 +94,9 @@ process.on('unhandledRejection', err => {
|
|||||||
update "user_sessions" set ${
|
update "user_sessions" set ${
|
||||||
db({
|
db({
|
||||||
last_used: ~~(Date.now() / 1e3),
|
last_used: ~~(Date.now() / 1e3),
|
||||||
|
last_action: req.url.pathname,
|
||||||
browser: req.headers['user-agent']
|
browser: req.headers['user-agent']
|
||||||
}, 'last_used', 'browser')
|
}, 'last_used', 'last_action', 'browser')
|
||||||
}
|
}
|
||||||
where id = ${+user[0].sess_id}
|
where id = ${+user[0].sess_id}
|
||||||
`;
|
`;
|
||||||
|
@ -1,46 +1,11 @@
|
|||||||
@include(snippets/header)
|
@include(snippets/header)
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div class="about">
|
<div class="about">
|
||||||
<div>
|
<p>I invite you to enjoy some randomness</p>
|
||||||
<a href="//f0ck.me/48908"><img src="//f0ck.me/s/img/loool.webp" /></a>
|
<p>f0bm</p>
|
||||||
<p>thanks to our turkish fellow lol@n0xy/#f0ck for this gif <3</p>
|
<img src="/s/img/cockfag.png" alt="">
|
||||||
</div>
|
<p>mail: admin@w0bm.com</p>
|
||||||
<h5>f0ck Contact</h5>
|
<a href="/terms">Terms Of Service</a>
|
||||||
<p>Whatever it is, we might have a answer, even though it might not be the one you were looking for: <a href="mailto:admin@f0ck.me">admin@f0ck.me</a></p>
|
</div>
|
||||||
<h5>About f0ck</h5>
|
|
||||||
<p>f0ck is your friendly IRC shitposting bot, it's built for catching urls that are passed to it and displays the content of passed urls on a simple and accessible web gallery reachable at <a href="/">f0ck.me</a></p>
|
|
||||||
<h5>WTF is a f0ck?</h5>
|
|
||||||
<p>A f0ck is basically giving a fuck about some internet bullshit, like stupid images, videos and so on, but also for great things like good music taste and shit, it's basically "a f0ck was given" and f0ck and it's users gave a lot of f0cks over the past years, it's not hard to finally start giving a damn f0ck about something, just f0ck it dood!</p>
|
|
||||||
<h5>Where to f0ck?</h5>
|
|
||||||
<h4>#f0ck on n0xy.net</h4>
|
|
||||||
<p>You can invite f0ck to your channel on the following supported networks by simply typing<br><code>/invite f0ck</code></p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://n0xy.net">n0xy.net</a></li>
|
|
||||||
<li><a href="https://www.rizon.net/">rizon.net</a></li>
|
|
||||||
<li><a href="https://libera.chat/">libera.chat</a></li>
|
|
||||||
</ul>
|
|
||||||
<p>To start f0cking the shit out of something simply add a <code>!f0ck</code> behind the url you want to f0ck, that's it</p>
|
|
||||||
<p>#f0ck specific: to have f0ck ignore a link add <code>!ignore</code> at the end <br>Example: <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" target="_blank">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a> !ignore</p>
|
|
||||||
<p>f0ck supports a variety of websites, in fact all websites supported by <code>yt-dlp</code> are supported by f0ck aswell!</p>
|
|
||||||
<h5>f0ck Rules</h5>
|
|
||||||
<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), 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>
|
|
||||||
<ul>
|
|
||||||
<li>irc.n0xy.net #f0ck</li>
|
|
||||||
<li>admin@f0ck.me</li>
|
|
||||||
</ul>
|
|
||||||
<h5>Compatibility</h5>
|
|
||||||
<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>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>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
@include(snippets/footer)
|
@include(snippets/footer)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
<td>browser</td>
|
<td>browser</td>
|
||||||
<td>created_at</td>
|
<td>created_at</td>
|
||||||
<td>last_used</td>
|
<td>last_used</td>
|
||||||
|
<td>last_action</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -22,6 +23,7 @@
|
|||||||
<td>{{ session.browser }}</td>
|
<td>{{ session.browser }}</td>
|
||||||
<td>{{ new Date(session.created_at * 1e3).toLocaleString("de-DE") }}</td>
|
<td>{{ new Date(session.created_at * 1e3).toLocaleString("de-DE") }}</td>
|
||||||
<td>{{ new Date(session.last_used * 1e3).toLocaleString("de-DE") }}</td>
|
<td>{{ new Date(session.last_used * 1e3).toLocaleString("de-DE") }}</td>
|
||||||
|
<td>{{ session.last_action }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endeach
|
@endeach
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -2,14 +2,11 @@
|
|||||||
<canvas class="hidden-xs" id="bg"></canvas>
|
<canvas class="hidden-xs" id="bg"></canvas>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="_204863">
|
<div class="_204863">
|
||||||
<div class="imageDoor" style="--hover-image: url('/t/{{ item.id }}.webp');">
|
<div class="imageDoor"></div>
|
||||||
<img src="/t/{{ item.id }}.webp" alt="" />
|
<div class="gapLeft"></div>
|
||||||
</div>
|
|
||||||
<div class="gapLeft">
|
|
||||||
<span class="populateME"><b>f0ck</b> - {{ item.id }}</span>
|
|
||||||
</div>
|
|
||||||
@if(session)
|
@if(session)
|
||||||
<div class="gapRight">
|
<div class="gapRight">
|
||||||
<svg class="iconset" id="a_favo"><use href="/s/img/iconset.svg#heart_{{ Object.values(item.favorites).filter(u => u.user == session.user)[0] ? 'solid' : 'regular' }}"></use></svg>
|
<svg class="iconset" id="a_favo"><use href="/s/img/iconset.svg#heart_{{ Object.values(item.favorites).filter(u => u.user == session.user)[0] ? 'solid' : 'regular' }}"></use></svg>
|
||||||
@ -36,7 +33,7 @@
|
|||||||
<video id="my-video" class="embed-responsive-item" width="640" height="360" src="{{ item.dest }}" preload="auto" autoplay controls loop playsinline></video>
|
<video id="my-video" class="embed-responsive-item" width="640" height="360" src="{{ item.dest }}" preload="auto" autoplay controls loop playsinline></video>
|
||||||
</div>
|
</div>
|
||||||
@elseif(item.mime.startsWith("audio"))
|
@elseif(item.mime.startsWith("audio"))
|
||||||
<div class="embed-responsive embed-responsive-16by9" style="background: url('@if(item.coverart)//f0ck.me{{ item.coverart }}@else/s/img/200.gif@endif') no-repeat center / contain black;">
|
<div class="embed-responsive embed-responsive-16by9" style="background: url('@if(item.coverart)//w0bm.com{{ item.coverart }}@else/s/img/200.gif@endif') no-repeat center / contain black;">
|
||||||
<audio id="my-video" class="embed-responsive-item" autoplay controls loop src="{{ item.dest }}" data-setup="{}" poster="@if(item.coverart){{ item.coverart }}@else/s/img/200.gif@endif" type="{{ item.mime }}"></audio>
|
<audio id="my-video" class="embed-responsive-item" autoplay controls loop src="{{ item.dest }}" data-setup="{}" poster="@if(item.coverart){{ item.coverart }}@else/s/img/200.gif@endif" type="{{ item.mime }}"></audio>
|
||||||
</div>
|
</div>
|
||||||
@elseif(item.mime.startsWith("image"))
|
@elseif(item.mime.startsWith("image"))
|
||||||
@ -62,23 +59,39 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
<span class="badge badge-dark">
|
<div class="kontrollelement">
|
||||||
|
<div class="einheit">
|
||||||
|
@if(typeof pagination !== "undefined")
|
||||||
|
<nav class="steuerung">
|
||||||
|
@if(pagination.prev)
|
||||||
|
<a id="" href="{{ link.main }}{{ pagination.prev }}">← next</a>
|
||||||
|
@else
|
||||||
|
<a id="" href="#" style="visibility: hidden">← next</a>
|
||||||
|
@endif
|
||||||
|
<span>|</span>
|
||||||
|
<a id="random" class="" href="/random">
|
||||||
|
<span>random</span>
|
||||||
|
</a>
|
||||||
|
<span>
|
||||||
|
|
|
||||||
|
</span>
|
||||||
|
@if(pagination.next)
|
||||||
|
<a id="" href="{{ link.main }}{{ pagination.next }}">prev →</a>
|
||||||
|
@else
|
||||||
|
<a id="" href="#" style="visibility: hidden">prev →</a>
|
||||||
|
@endif
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="blahlol">
|
||||||
|
<span class="badge badge-dark">
|
||||||
<a href="/{{ item.id }}" class="id-link">{{ item.id }}</a>
|
<a href="/{{ item.id }}" class="id-link">{{ item.id }}</a>
|
||||||
@if(session)
|
@if(session)
|
||||||
(<a id="a_username" href="/user/{{ user.name.toLowerCase() }}/f0cks@if(tmp.mime)/{{ tmp.mime }}@endif">{{ user.name }}</a>)
|
(<a id="a_username" href="/user/{{ user.name.toLowerCase() }}/f0cks@if(tmp.mime)/{{ tmp.mime }}@endif">{{ user.name }}</a>)
|
||||||
@endif
|
@endif
|
||||||
</span>
|
</span>
|
||||||
<span class="badge badge-dark">{{ user.network }} / {{ user.channel }}</span>
|
|
||||||
<span class="badge badge-dark image-source">
|
|
||||||
@if(item.src.long.length)
|
|
||||||
<a href="{{ item.src.long }}" target="_blank">{{ item.src.short }}</a>
|
|
||||||
@else
|
|
||||||
hidden
|
|
||||||
@endif
|
|
||||||
</span>
|
|
||||||
<span class="badge badge-dark"><a class="dest-link" href="{{ item.dest }}" target="_blank">{{ item.mime }}</a> / {{ item.size }}</span>
|
|
||||||
<span class="badge badge-dark"><time class="timeago" tooltip="{{ item.timestamp.timefull }}">{{ item.timestamp.timeago }}</time></span>
|
<span class="badge badge-dark"><time class="timeago" tooltip="{{ item.timestamp.timefull }}">{{ item.timestamp.timeago }}</time></span>
|
||||||
<span class="badge badge-dark">{{ phrase }}</span>
|
|
||||||
<span class="badge badge-dark" id="tags">
|
<span class="badge badge-dark" id="tags">
|
||||||
@if(typeof item.tags !== "undefined")
|
@if(typeof item.tags !== "undefined")
|
||||||
@each(item.tags as tag)
|
@each(item.tags as tag)
|
||||||
@ -99,8 +112,26 @@
|
|||||||
@endeach
|
@endeach
|
||||||
@endif
|
@endif
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@if(session)
|
||||||
|
<comentario-count path="/{{ item.id }}"
|
||||||
|
placeholder="..."
|
||||||
|
error-text="ERR"
|
||||||
|
zero-text="foobar"
|
||||||
|
prefix="("
|
||||||
|
suffix=")"></comentario-count>
|
||||||
|
<div class="comments">
|
||||||
|
<script defer src="https://c.w0bm.com/comentario.js"></script>
|
||||||
|
<comentario-comments auto-init="false"
|
||||||
|
no-fonts="true">
|
||||||
|
|
||||||
|
</comentario-comments>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@include(snippets/footer)
|
@include(snippets/footer)
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title>f0ck login</title>
|
<title>login</title>
|
||||||
<link href="/s/css/f0ck.css" rel="stylesheet" />
|
<link href="/s/css/f0ck.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body type="login">
|
<body type="login">
|
||||||
<form class="login-form" method="post" action="/login">
|
<form class="login-form" method="post" action="/login">
|
||||||
<p><a href="/"><img src="/s/img/f0ck_small.png" /></a></p>
|
<img class="login-image" src="/s/img/w0bm_mosh_banner_by_marderchen.gif" alt="">
|
||||||
<input type="text" name="username" placeholder="username" autocomplete="off" autofocus required />
|
<input type="text" name="username" placeholder="username" autocomplete="off" required />
|
||||||
<input type="password" name="password" placeholder="password" autocomplete="off" 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>
|
<p><input type="checkbox" id="kmsi" name="kmsi" /> <label for="kmsi">stay signed in</label></p>
|
||||||
<button type="submit">Login</button>
|
<button type="submit">Login</button>
|
||||||
|
@ -1,51 +1,63 @@
|
|||||||
@include(snippets/header)
|
@include(snippets/header)
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div class="topf0ckers">
|
<div class="topf0ckers">
|
||||||
<h3>Top f0ckers of all time <br>- Ranking -</h3>
|
<h3>f0ck Rankings?</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="ranking">
|
<div class="theforceofthree">
|
||||||
<div class="by-user">
|
<div class="triin">
|
||||||
<h3>Biggest taggers</h3>
|
</div>
|
||||||
<table class="table">
|
<div class="ranking">
|
||||||
<tbody>
|
<div class="by-user">
|
||||||
@for(let i = 0; i < list.length; i++)
|
<h3>Biggest taggers</h3>
|
||||||
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ i + 1 }}</td>
|
<th>Rank</th>
|
||||||
<td><a href="/{{ list[i].avatar }}"><img class="avatar" src="/t/{{ list[i].avatar }}.webp"></a></td>
|
<th>Avatar</th>
|
||||||
<td>@if(list[i].admin)⭐ @endif<a href="/user/{!! list[i].user !!}">{!! list[i].user !!}</a></td>
|
<th>Username</th>
|
||||||
<td>{{ list[i].count }}</td>
|
<th>Tagged</th>
|
||||||
</tr>
|
</tr>
|
||||||
@endfor
|
<tbody>
|
||||||
</tbody>
|
@for(let i = 0; i < list.length; i++)
|
||||||
</table>
|
<tr>
|
||||||
</div>
|
<td>{{ i + 1 }}</td>
|
||||||
<div class="by-hoster">
|
<td><a href="/{{ list[i].avatar }}"><img class="avatar" src="/t/{{ list[i].avatar }}.webp"></a></td>
|
||||||
<h3>Top {{ hoster.length }} hoster</h3>
|
<td>@if(list[i].admin)⭐ @endif<a href="/user/{!! list[i].user !!}">{!! list[i].user !!}</a></td>
|
||||||
<table class="table">
|
<td>{{ list[i].count }}</td>
|
||||||
@each(hoster as host)
|
</tr>
|
||||||
<tr><td>{{ host.part.length ? host.part : "Telegram" }}</td><td>{{ host.c }}</td></tr>
|
@endfor
|
||||||
@endeach
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="by-stats">
|
<div class="by-hoster">
|
||||||
<h3>Tag stats</h3>
|
<h3>Top {{ hoster.length }} hoster</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr><td>total</td><td>{{ stats.total }}</td></tr>
|
@each(hoster as host)
|
||||||
<tr><td>tagged</td><td>{{ stats.tagged }}</td></tr>
|
<tr><td>{{ host.part.length ? host.part : "Telegram" }}</td><td>{{ host.c }}</td></tr>
|
||||||
<tr><td>untagged</td><td>{{ stats.untagged }}</td></tr>
|
@endeach
|
||||||
<tr><td>SFW</td><td>{{ stats.sfw }}</td></tr>
|
</table>
|
||||||
<tr><td>NSFW</td><td>{{ stats.nsfw }}</td></tr>
|
</div>
|
||||||
<tr><td>deleted</td><td>{{ stats.deleted }}</td></tr>
|
<div class="by-stats">
|
||||||
<tr><td>missing ids</td><td>{{ stats.untracked }}</td></tr>
|
<h3>Tag stats</h3>
|
||||||
</table>
|
<table class="table">
|
||||||
|
<tr><td>total</td><td>{{ stats.total }}</td></tr>
|
||||||
|
<tr><td>tagged</td><td>{{ stats.tagged }}</td></tr>
|
||||||
|
<tr><td>untagged</td><td>{{ stats.untagged }}</td></tr>
|
||||||
|
<tr><td>SFW</td><td>{{ stats.sfw }}</td></tr>
|
||||||
|
<tr><td>NSFW</td><td>{{ stats.nsfw }}</td></tr>
|
||||||
|
<tr><td>deleted</td><td>{{ stats.deleted }}</td></tr>
|
||||||
|
<tr><td>missing ids</td><td>{{ stats.untracked }}</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h3>Top f0cks</h3>
|
<h3>Top f0cks</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@each(favotop as favo)
|
@each(favotop as favo)
|
||||||
<tr><td><a href="/{{ favo.item_id }}">{{ favo.item_id }}</a></td><td>{{ favo.favs }}</td></tr>
|
<tr><td><a href="/{{ favo.item_id }}">{{ favo.item_id }}</a></td><td>{{ favo.favs }}</td></tr>
|
||||||
@endeach
|
@endeach
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="triout">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@include(snippets/footer)
|
@include(snippets/footer)
|
||||||
|
@ -2,13 +2,7 @@
|
|||||||
<div id="main">
|
<div id="main">
|
||||||
<div class="f0ckgle">
|
<div class="f0ckgle">
|
||||||
<div class="search-title">
|
<div class="search-title">
|
||||||
<span style="color:#4285F4;">f</span>
|
<span>search</span>
|
||||||
<span style="color:#EA4335;">0</span>
|
|
||||||
<span style="color:#FBBC05;">c</span>
|
|
||||||
<span style="color:#4285F4;">k</span>
|
|
||||||
<span style="color:#34A853;">g</span>
|
|
||||||
<span style="color:#EA4335;">l</span>
|
|
||||||
<span style="color:#4285F4;">e</span>
|
|
||||||
</div>
|
</div>
|
||||||
<form action="/search" class="admin-search">
|
<form action="/search" class="admin-search">
|
||||||
<input type="text" name="tag" value="{!! searchstring || '' !!}" /><button type="submit">🔍</button>
|
<input type="text" name="tag" value="{!! searchstring || '' !!}" /><button type="submit">🔍</button>
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en" theme="@if(typeof theme !== "undefined"){{ theme }}@endif" res="@if(typeof fullscreen !== "undefined"){{ fullscreen == 1 ? 'fullscreen' : '' }}@endif">
|
<html lang="en" theme="@if(typeof theme !== "undefined"){{ theme }}@endif" res="@if(typeof fullscreen !== "undefined"){{ fullscreen == 1 ? 'fullscreen' : '' }}@endif">
|
||||||
<head>
|
<head>
|
||||||
<title>f0ck!</title>
|
<title>f0bm</title>
|
||||||
<meta name="description" content="Welcome to the internet"/>
|
<link rel="icon" type="image/gif" href="/s/img/favicon.png" />
|
||||||
<meta property="og:image" content="/s/img/favicon.gif">
|
|
||||||
<link rel="icon" type="image/gif" href="/s/img/favicon.gif" />
|
|
||||||
<link rel="stylesheet" href="/s/css/f0ck.css?v=@mtime(/public/s/css/f0ck.css)">
|
<link rel="stylesheet" href="/s/css/f0ck.css?v=@mtime(/public/s/css/f0ck.css)">
|
||||||
|
<link rel="stylesheet" href="/s/css/w0bm.css?v=@mtime(/public/s/css/w0bm.css)">
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
@if(typeof item !== "undefined")<link rel="canonical" href="https://f0ck.me/{{ item.id }}" />@endif
|
@if(typeof item !== "undefined")<link rel="canonical" href="https://w0bm.com/{{ item.id }}" />@endif
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@include(snippets/navbar)
|
@include(snippets/navbar)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
@if(session)
|
<!-- @if(session)
|
||||||
<nav class="navbar navbar-expand-lg">
|
<nav class="navbar navbar-expand-lg">
|
||||||
<a class="navbar-brand" href="/"><span class="f0ck" width="" height="">F0CK</span></a>
|
<a class="navbar-brand" href="/"><img class="image-brand" src="/s/img/w0bm_mosh_banner_by_marderchen.gif" alt="w...?"><span class="f0ck" width="" height=""></span></a>
|
||||||
<div class="navigation-links">
|
<div class="navigation-links">
|
||||||
<ul class="navbar-nav">
|
<ul class="navbar-nav">
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link user" href="#" content="{{ session.user }}" data-toggle="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 class="navUserName">@if(session.admin)⭐ @endif{{ session.user }}</span>
|
<img src="@if(session.avatar)/t/{{ session.avatar }}.webp@else/s/img/ava/default.png@endif" class="avatar"><span>@if(session.admin)⭐ @endif{{ session.user }}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="/user/{{ session.user.toLowerCase() }}">my profile</a></li>
|
<li><a href="/user/{{ session.user.toLowerCase() }}">my profile</a></li>
|
||||||
@ -19,6 +19,12 @@
|
|||||||
<li><a href="/logout">logout</a></li>
|
<li><a href="/logout">logout</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a id="tags-nav" class="nav-link" href="/tags">
|
||||||
|
<span class="nav-link-identifier">tags</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li class="nav-item dropdown" id="themes">
|
<li class="nav-item dropdown" id="themes">
|
||||||
<a class="nav-link ddcontent" href="#" content="{{ theme }}" data-toggle="dropdown">Themes</a>
|
<a class="nav-link ddcontent" href="#" content="{{ theme }}" data-toggle="dropdown">Themes</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
@ -27,31 +33,15 @@
|
|||||||
@endeach
|
@endeach
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link ddcontent" href="#"@if(tmp?.mime) content="{{ tmp?.mime }}" data-toggle="dropdown"@endif>Filter@if(!tmp?.mime) ▼@endif</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a class="dropdown-item" href="/@if(tmp?.user)user/{{ tmp?.user }}/@endif">All</a></li>
|
|
||||||
<li><a class="dropdown-item" href="/@if(tmp?.user)user/{{ tmp?.user }}/@endifaudio">Audio</a></li>
|
|
||||||
<li><a class="dropdown-item" href="/@if(tmp?.user)user/{{ tmp?.user }}/@endifvideo">Video</a></li>
|
|
||||||
<li><a class="dropdown-item" href="/@if(tmp?.user)user/{{ tmp?.user }}/@endifimage">Image</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item @if(session)dropdown@endif">
|
|
||||||
<a class="nav-link ddcontent" href="#"@if(typeof session.mode !== "undefined") content="{{ modes[session.mode] ?? 'sfw' }}" data-toggle="dropdown"@endif>Mode</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
@for(let i = 0; i < modes.length; i++)
|
|
||||||
<li><a class="dropdown-item" href="/mode/{{ i }}">{{ modes[i] }}</a></li>
|
|
||||||
@endfor
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a id="random" class="nav-link" href="/random">
|
<a id="random" class="nav-link" href="/random">
|
||||||
<span class="nav-link-identifier">Random</span>
|
<span class="nav-link-identifier">Random</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse navbar-collapse show" id="navbarSupportedContent">
|
<div class="navigation-rechts">
|
||||||
|
<ul class="navbar-nav">
|
||||||
<div class="pagination-container-fluid">
|
<div class="pagination-container-fluid">
|
||||||
<div class="pagination-wrapper">
|
<div class="pagination-wrapper">
|
||||||
@if(typeof pagination !== "undefined")
|
@if(typeof pagination !== "undefined")
|
||||||
@ -71,19 +61,118 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@else
|
@else
|
||||||
<nav class="navbar navbar-expand-lg">
|
<nav class="navbar navbar-expand-lg">
|
||||||
<a class="navbar-brand" href="/"><span class="f0ck" width="" height="">F0CK</span></a>
|
<a class="navbar-brand" href="/"><img class="image-brand" src="/s/img/w0bm_mosh_banner_by_marderchen.gif" alt="w...?"><span class="f0ck" width="" height=""></span></a>
|
||||||
|
<div class="navigation-links">
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/about">About</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item dropdown" id="themes">
|
||||||
|
<a class="nav-link ddcontent" href="#" content="{{ theme }}" data-toggle="dropdown">Themes</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
@each(themes as t)
|
||||||
|
<li><a href="/theme/{{ t }}">{{ t }}</a></li>
|
||||||
|
@endeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a id="random" class="nav-link" href="/random">
|
||||||
|
<span class="nav-link-identifier">Random</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
@endif -->
|
||||||
|
|
||||||
|
@if(session)
|
||||||
|
<nav class="navbar navbar-expand-lg">
|
||||||
|
<a class="navbar-brand" href="/"><img class="image-brand" src="/s/img/w0bm_mosh_banner_by_marderchen.gif" alt="w...?"><span class="f0ck" width="" height=""></span></a>
|
||||||
|
<div class="navigation-links">
|
||||||
|
<div class="pagination-container-fluid">
|
||||||
|
<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)⭐ @endif{{ session.user }}</span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="/user/{{ session.user.toLowerCase() }}">my profile</a></li>
|
||||||
|
<li><a href="/user/{{ session.user.toLowerCase() }}/f0cks">my f0cks</a></li>
|
||||||
|
<li><a href="/user/{{ session.user.toLowerCase() }}/favs">my favs</a></li>
|
||||||
|
<li><a href="/search">search</a></li>
|
||||||
|
@if(session.admin)<li><a href="/admin">Admin</a></li>@endif
|
||||||
|
<li><a href="/about">About</a></li>
|
||||||
|
<li><a href="/ranking">ranking</a></li>
|
||||||
|
<li><a href="/settings">settings</a></li>
|
||||||
|
<li><a href="/logout">logout</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item dropdown" id="themes">
|
||||||
|
<a class="nav-link ddcontent" href="#" content="{{ theme }}" data-toggle="dropdown">𐂧</a>
|
||||||
|
<ul class="dropdown-menu shii">
|
||||||
|
@each(themes as t)
|
||||||
|
<li><a href="/theme/{{ t }}">{{ t }}</a></li>
|
||||||
|
@endeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item @if(session)dropdown@endif">
|
||||||
|
<a class="nav-link ddcontent" href="#"@if(typeof session.mode !== "undefined") content="{{ modes[session.mode] ?? 'sfw' }}" data-toggle="dropdown"@endif>Mode</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
@for(let i = 0; i < modes.length; i++)
|
||||||
|
<li><a class="dropdown-item" href="/mode/{{ i }}">{{ modes[i] }}</a></li>
|
||||||
|
@endfor
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a id="explore-tags" class="nav-link" href="/tags">
|
||||||
|
<span class="nav-link-identifier">Tags</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a id="random" class="nav-link" href="/random">
|
||||||
|
<span class="nav-link-identifier">Random</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse navbar-collapse show" id="navbarSupportedContent">
|
||||||
|
<div class="pagination-wrapper">
|
||||||
|
@if(typeof pagination !== "undefined")
|
||||||
|
<nav class="pagination">
|
||||||
|
<a href="{{ link.main }}{{ link.path }}{{ pagination.start }}" class="page-item-1 btn start@if(!pagination.prev) disabled@endif">«</a>
|
||||||
|
<a href="{{ link.main }}{{ link.path }}{{ pagination.prev }}" class="page-item-2 btn prev@if(!pagination.prev) disabled@endif">‹</a>
|
||||||
|
@each(pagination.cheat as i)
|
||||||
|
@if(i == pagination.page)
|
||||||
|
<span class="btn disabled">{{ i }}</span>
|
||||||
|
@else
|
||||||
|
<a href="{{ link.main }}{{ link.path }}{{ i }}" class="pagination-int-item btn">{{ i }}</a>
|
||||||
|
@endif
|
||||||
|
@endeach
|
||||||
|
<a href="{{ link.main }}{{ link.path }}{{ pagination.next }}" class="page-item-3 btn next@if(!pagination.next) disabled@endif">›</a>
|
||||||
|
<a href="{{ link.main }}{{ link.path }}{{ pagination.end }}" class="page-item-4 btn start@if(!pagination.next) disabled@endif">»</a>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
@else
|
||||||
|
<nav class="navbar navbar-expand-lg">
|
||||||
|
<a class="navbar-brand" href="/"><img class="image-brand" src="/s/img/w0bm_mosh_banner_by_marderchen.gif" alt="w...?"><span class="f0ck" width="" height=""></span></a>
|
||||||
|
|
||||||
<div class="navigation-links-guest">
|
<div class="navigation-links-guest">
|
||||||
<ul class="navbar-nav-guests">
|
<ul class="navbar-nav-guests">
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/about" data-toggle="dropdown">About</a>
|
<a class="nav-link" href="/about">About</a>
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href="/login">login</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropdown" id="themes">
|
<li class="nav-item dropdown" id="themes">
|
||||||
<a class="nav-link ddcontent" href="#" content="{{ theme }}" data-toggle="dropdown">Themes</a>
|
<a class="nav-link ddcontent" href="#" content="{{ theme }}" data-toggle="dropdown">Themes</a>
|
||||||
@ -93,22 +182,9 @@
|
|||||||
@endeach
|
@endeach
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link ddcontent" href="#"@if(tmp?.mime) content="{{ tmp?.mime }}" data-toggle="dropdown"@endif>Filter@if(!tmp?.mime) ▼@endif</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a class="dropdown-item" href="/@if(tmp?.user)user/{{ tmp?.user }}/@endif">All</a></li>
|
|
||||||
<li><a class="dropdown-item" href="/@if(tmp?.user)user/{{ tmp?.user }}/@endifaudio">Audio</a></li>
|
|
||||||
<li><a class="dropdown-item" href="/@if(tmp?.user)user/{{ tmp?.user }}/@endifvideo">Video</a></li>
|
|
||||||
<li><a class="dropdown-item" href="/@if(tmp?.user)user/{{ tmp?.user }}/@endifimage">Image</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a id="random" class="nav-link" href="/random">
|
|
||||||
<span class="nav-link-identifier">Random</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- rechte seite -->
|
||||||
<div class="collapse navbar-collapse show" id="navbarSupportedContent">
|
<div class="collapse navbar-collapse show" id="navbarSupportedContent">
|
||||||
<div class="pagination-container-fluid">
|
<div class="pagination-container-fluid">
|
||||||
<div class="pagination-wrapper">
|
<div class="pagination-wrapper">
|
||||||
|
18
views/tags.html
Normal file
18
views/tags.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
@include(snippets/header)
|
||||||
|
<div id="main">
|
||||||
|
<div class="container">
|
||||||
|
<h3 style="text-align: center;">☯</h3>
|
||||||
|
<div class="tags">
|
||||||
|
@each(toptags as toptag)
|
||||||
|
<div class="tag badge badge-light mr-2">
|
||||||
|
<!-- <img src="/s/img/tags/{!! toptag.tag !!}.webp" alt=""> -->
|
||||||
|
<div class="tagbox-body">
|
||||||
|
<span class="toptag_id">{!! toptag.tag !!}</span>
|
||||||
|
<span class="toptag_tag"><a href="/tag/{!! toptag.tag !!}">{{ toptag.total_items }}</a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@include(snippets/footer)
|
40
views/terms.html
Normal file
40
views/terms.html
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
@include(snippets/header)
|
||||||
|
<div id="main">
|
||||||
|
<div class="tos">
|
||||||
|
<p>Terms of Service</p>
|
||||||
|
<ol>
|
||||||
|
<li>Acceptance of Terms</li>
|
||||||
|
<p>By accessing and using this website, you acknowledge that your access is a privilege, not a right. If you do not agree with these terms, you are free to leave at any time.</p>
|
||||||
|
<li>No Claims</li>
|
||||||
|
<p>Visitors to this website have no claims whatsoever against the website owner or operators. Access to the website and its content is provided as-is, with no guarantees, warranties, or entitlements of any kind.</p>
|
||||||
|
<li>No Liability</li>
|
||||||
|
<p>This website and its operators assume no liability for any errors, omissions, inaccuracies, or any other issues that may arise from the use of this site. Use of this website is entirely at your own risk.</p>
|
||||||
|
<li>No Warranty</li>
|
||||||
|
<p>There is no warranty regarding the completeness, accuracy, reliability, or availability of the content provided on this website. The content may change at any time without notice.</p>
|
||||||
|
<li>Compliance with Requests</li>
|
||||||
|
<p>The website owner reserves the right to remove content, restrict access, or comply with any valid legal or personal requests at their sole discretion.</p>
|
||||||
|
<li>Changes to Terms</li>
|
||||||
|
<p>These terms may be updated at any time without prior notice. It is your responsibility to review them periodically.</p>
|
||||||
|
</ol>
|
||||||
|
<p>Data Privacy</p>
|
||||||
|
<ol>
|
||||||
|
<li>No Data Logging</li>
|
||||||
|
<p>This website does not collect, store, or log any personal data, including IP addresses or other identifying information. No server-side logs are maintained.</p>
|
||||||
|
|
||||||
|
<li>Use of Cookies</li>
|
||||||
|
<p>Upon changing the theme, a single cookie is set. This cookie solely stores the name of the currently active theme to enhance the visual experience. It does not contain any personal data, tracking information, or other identifiers.</p>
|
||||||
|
|
||||||
|
<li>Cookie Control</li>
|
||||||
|
<p>The cookie is purely of cosmetic nature and not essential for the website's functionality. Users can disable cookies for this website entirely via their browser settings without affecting their ability to access and use the site.</p>
|
||||||
|
|
||||||
|
<li>No Third-Party Tracking</li>
|
||||||
|
<p>This website does not use third-party tracking services, analytics tools, or embedded content that collects user data.</p>
|
||||||
|
|
||||||
|
<li>Changes to This Policy</li>
|
||||||
|
<p>This privacy policy may be updated from time to time. Users are encouraged to review it periodically to stay informed about any changes.</p>
|
||||||
|
|
||||||
|
<p>By using this website, you acknowledge and accept the terms of service and the data privacy policy.</p>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@include(snippets/footer)
|
@ -4,8 +4,8 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
@each(f0cks as f0ck)
|
@each(f0cks as f0ck)
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="//f0ck.me/{{ f0ck.id }}"><img src="//f0ck.me/t/{{ f0ck.id }}.webp" /></a></td>
|
<td><a href="//w0bm.com/{{ f0ck.id }}"><img src="//w0bm.com/t/{{ f0ck.id }}.webp" /></a></td>
|
||||||
<td><a href="//f0ck.me/{{ f0ck.id }}">{{ f0ck.id }}</a></td>
|
<td><a href="//w0bm.com/{{ f0ck.id }}">{{ f0ck.id }}</a></td>
|
||||||
<td>{{ f0ck.username }}</td>
|
<td>{{ f0ck.username }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endeach
|
@endeach
|
||||||
|
Loading…
x
Reference in New Issue
Block a user