From dfd41279a04e374925df45e21a69e26fc4d3dc5d Mon Sep 17 00:00:00 2001 From: Franciskid Date: Tue, 7 Jul 2026 20:12:59 +0200 Subject: [PATCH] ShareLinks: stop injecting the guest-link button into form dialogs The action-sheet fallback matched any dialog with 2+ buttons, which caught the Add to Collection dialog and stuck a Create guest link button next to OK. Skip containers that have a select/text input/ textarea, since real action sheets are just a list of buttons/links. --- Jellyfin.Plugin.ShareLinks/Web/sharelinks.js | 4 ++++ manifest.json | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Plugin.ShareLinks/Web/sharelinks.js b/Jellyfin.Plugin.ShareLinks/Web/sharelinks.js index ac0f2e3..c2bb0a9 100644 --- a/Jellyfin.Plugin.ShareLinks/Web/sharelinks.js +++ b/Jellyfin.Plugin.ShareLinks/Web/sharelinks.js @@ -423,6 +423,10 @@ } function looksLikeActionContainer(node) { + if (node.querySelector('select, input:not([type="checkbox"]):not([type="radio"]), textarea')) { + return false; + } + var actions = Array.from(node.querySelectorAll('button, a, [role="menuitem"], [role="option"], .actionsheetMenuItem, .paperListButton')) .filter(isVisible); return actions.length >= 2 && actions.length <= 40; diff --git a/manifest.json b/manifest.json index 7fc27e1..a598210 100644 --- a/manifest.json +++ b/manifest.json @@ -13,8 +13,8 @@ "changelog": "Initial release: ShareLink button on the item menu, temporary guest users confined by tag policy, expiring one-use links, admin dashboard with revoke, and a configurable guest lockdown that hides tag/genre/studio/cast links, the add-to-playlist and add-to-collection actions, and other plugins' UI.", "targetAbi": "10.11.0.0", "sourceUrl": "https://github.com/Franciskid/jellyfin-plugin-sharelinks/releases/download/v1.0.0.0/sharelinks_1.0.0.0.zip", - "checksum": "b9d94ddab91e7078046711b77d6ef18b", - "timestamp": "2026-07-07T00:00:00Z" + "checksum": "d779dc06a710788d7db698f66d5690bc", + "timestamp": "2026-07-07T20:12:00Z" } ] }