mirror of
https://git.coom.tech/fuckjannies/lolipiss.git
synced 2024-06-29 22:12:37 +00:00
Merge branch 'feat-black-posts' into 中出し
This commit is contained in:
commit
04e7ca19b1
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name PNGExtraEmbed2
|
// @name PNGExtraEmbed2
|
||||||
// @namespace https://coom.tech/
|
// @namespace https://coom.tech/
|
||||||
// @version 0.160
|
// @version 0.162
|
||||||
// @description uhh
|
// @description uhh
|
||||||
// @author You
|
// @author You
|
||||||
// @match https://boards.4channel.org/*
|
// @match https://boards.4channel.org/*
|
||||||
|
|
11
main.user.js
11
main.user.js
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name PNGExtraEmbed2
|
// @name PNGExtraEmbed2
|
||||||
// @namespace https://coom.tech/
|
// @namespace https://coom.tech/
|
||||||
// @version 0.160
|
// @version 0.162
|
||||||
// @description uhh
|
// @description uhh
|
||||||
// @author You
|
// @author You
|
||||||
// @match https://boards.4channel.org/*
|
// @match https://boards.4channel.org/*
|
||||||
|
@ -17139,8 +17139,13 @@
|
||||||
res2 = res2?.filter((e) => e);
|
res2 = res2?.filter((e) => e);
|
||||||
if (!res2 || res2.length == 0)
|
if (!res2 || res2.length == 0)
|
||||||
return;
|
return;
|
||||||
let test = res2?.flatMap((e) => e[0].map((k) => [k, e[1]]));
|
let filtered = res2?.filter((e) => e != null);
|
||||||
processAttachments(post, res2?.flatMap((e) => e[0].map((k) => {
|
if (filtered.length === 0) {
|
||||||
|
console.warn("ImageProcessors returned empty for post.");
|
||||||
|
console.warn(post);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
processAttachments(post, filtered.flatMap((e) => e[0].map((k) => {
|
||||||
if (k?.isBlacklisted === true) {
|
if (k?.isBlacklisted === true) {
|
||||||
post.querySelector(".reply")?.classList.add("hasblack");
|
post.querySelector(".reply")?.classList.add("hasblack");
|
||||||
}
|
}
|
||||||
|
|
11
src/main.ts
11
src/main.ts
|
@ -179,10 +179,15 @@ const processPost = async (post: HTMLDivElement) => {
|
||||||
if (!res2 || res2.length == 0)
|
if (!res2 || res2.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let test = res2?.flatMap(e => e![0].map(k => [k, e![1]] as [EmbeddedFile, EMBED_TYPES]));
|
|
||||||
// processAttachments(post, res2?.flatMap(e => e![0].map(k => [k, e![1]] as [EmbeddedFile, boolean])));
|
// processAttachments(post, res2?.flatMap(e => e![0].map(k => [k, e![1]] as [EmbeddedFile, boolean])));
|
||||||
processAttachments(post, res2?.flatMap(e =>
|
let filtered = res2?.filter(e => e != null) as [EmbeddedFile[], EMBED_TYPES][];
|
||||||
e![0].map(k => {
|
if(filtered.length === 0){
|
||||||
|
console.warn("ImageProcessors returned empty for post.")
|
||||||
|
console.warn(post)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
processAttachments(post, filtered.flatMap(e =>
|
||||||
|
e[0].map(k => {
|
||||||
if(k?.isBlacklisted === true){
|
if(k?.isBlacklisted === true){
|
||||||
post.querySelector('.reply')?.classList.add('hasblack');
|
post.querySelector('.reply')?.classList.add('hasblack');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user