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==
|
||||
// @name PNGExtraEmbed2
|
||||
// @namespace https://coom.tech/
|
||||
// @version 0.160
|
||||
// @version 0.162
|
||||
// @description uhh
|
||||
// @author You
|
||||
// @match https://boards.4channel.org/*
|
||||
|
|
11
main.user.js
11
main.user.js
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name PNGExtraEmbed2
|
||||
// @namespace https://coom.tech/
|
||||
// @version 0.160
|
||||
// @version 0.162
|
||||
// @description uhh
|
||||
// @author You
|
||||
// @match https://boards.4channel.org/*
|
||||
|
@ -17139,8 +17139,13 @@
|
|||
res2 = res2?.filter((e) => e);
|
||||
if (!res2 || res2.length == 0)
|
||||
return;
|
||||
let test = res2?.flatMap((e) => e[0].map((k) => [k, e[1]]));
|
||||
processAttachments(post, res2?.flatMap((e) => e[0].map((k) => {
|
||||
let filtered = res2?.filter((e) => e != null);
|
||||
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) {
|
||||
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)
|
||||
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 => {
|
||||
let filtered = res2?.filter(e => e != null) as [EmbeddedFile[], EMBED_TYPES][];
|
||||
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){
|
||||
post.querySelector('.reply')?.classList.add('hasblack');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user