Skip to content

Commit

Permalink
skip items if they remaind after the previous menu
Browse files Browse the repository at this point in the history
  • Loading branch information
GooseOb committed Dec 12, 2024
1 parent 32eedb9 commit 28d7ac4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "yt-defaulter",
"author": "GooseOb",
"version": "1.11.10",
"version": "1.11.11",
"repository": {
"type": "git",
"url": "git+https://github.com/GooseOb/YT-Defaulter.git"
Expand Down
6 changes: 5 additions & 1 deletion src/player/plr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ export const plr = {
name: YtSettingName,
finder: (item: Readonly<HTMLElement>) => boolean
) {
return findInNodeList(this.openItem(this.settingItems[name]), finder);
const prevItems = new Set(get.menuSubItems(this.element));
return findInNodeList(
this.openItem(this.settingItems[name]),
(item) => !prevItems.has(item) && finder(item)
);
},
},
};

0 comments on commit 28d7ac4

Please sign in to comment.