From 59b91009b1d45419f401d0ee25484c212920f97d Mon Sep 17 00:00:00 2001 From: kuangthree Date: Sun, 28 Jan 2024 18:00:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=A0=E5=90=8C=E6=AD=A5=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=EF=BC=8C=E5=8E=BB=E9=99=A4MutatableObserver=E5=AF=B9getCards?= =?UTF-8?q?=E7=9A=84=E4=BC=98=E5=8C=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/get/index.js | 10 ++-------- noname/library/cache/childNodesWatcher.js | 3 ++- noname/library/element/player.js | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/noname/get/index.js b/noname/get/index.js index b01adbd45..2466172d0 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -2271,14 +2271,8 @@ export class Get extends Uninstantable { static *iterableChildNodes(node){ for(let i=0;i{ for (let mutation of mutationsList) { @@ -16,7 +17,7 @@ export class ChildNodesWatcher{ } onChildNodesChanged(addedNodes,removedNodes) { - this.childNodes.addArray(Array.from(addedNodes)); + this.childNodes.addArray(Array.from(addedNodes).filter(node=>node.parentNode == this.dom)); this.childNodes.removeArray(Array.from(removedNodes)); } }; \ No newline at end of file diff --git a/noname/library/element/player.js b/noname/library/element/player.js index db78ce414..e5a44d4fa 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -3234,7 +3234,7 @@ export class Player extends HTMLDivElement { value = getCardName(card); } else { - value = cards[i][j]; + value = card[j]; } if ((typeof arg2[j] == 'string' && value != arg2[j]) || (Array.isArray(arg2[j]) && !arg2[j].includes(value))) {