mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
added custom parentShortCid
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
function findParentShortCid(parentCid, selectedFeed) {
|
||||
for (const thread of selectedFeed) {
|
||||
if (thread.cid === parentCid) {
|
||||
return thread.shortCid;
|
||||
}
|
||||
if (thread.replyCount > 0 && thread.replies.pages.topAll.comments) {
|
||||
const shortCid = findParentShortCid(parentCid, thread.replies.pages.topAll.comments);
|
||||
if (shortCid) {
|
||||
return shortCid;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export default findParentShortCid;
|
||||
Reference in New Issue
Block a user