p68
This commit is contained in:
@@ -624,21 +624,27 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
|
||||
deduplicateRetriexSourceChips(container);
|
||||
|
||||
const cards = Array.from(container.querySelectorAll('.retriex-meta-card[data-retriex-meta-id]'));
|
||||
const cardsById = new Map();
|
||||
|
||||
cards.forEach((card) => {
|
||||
const cardId = card.getAttribute('data-retriex-meta-id');
|
||||
[
|
||||
['.retriex-meta-card[data-retriex-meta-id]', 'data-retriex-meta-id'],
|
||||
['.retriex-action-card[data-retriex-action-card-id]', 'data-retriex-action-card-id'],
|
||||
].forEach(([selector, idAttribute]) => {
|
||||
Array.from(container.querySelectorAll(selector)).forEach((card) => {
|
||||
const cardId = card.getAttribute(idAttribute);
|
||||
|
||||
if (!cardId) {
|
||||
return;
|
||||
}
|
||||
if (!cardId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cardsById.has(cardId)) {
|
||||
cardsById.set(cardId, []);
|
||||
}
|
||||
const cardKey = `${selector}:${cardId}`;
|
||||
|
||||
cardsById.get(cardId).push(card);
|
||||
if (!cardsById.has(cardKey)) {
|
||||
cardsById.set(cardKey, []);
|
||||
}
|
||||
|
||||
cardsById.get(cardKey).push(card);
|
||||
});
|
||||
});
|
||||
|
||||
cardsById.forEach((group) => {
|
||||
|
||||
Reference in New Issue
Block a user