ShareLinks: disable tag links, actually hide add-to-playlist/collection
The movie detail page's Tags section lives in its own .itemTags container, not inside .detailsGroupItem like genres/studios/cast, so tag chips stayed clickable for guests. Disable those links too. The add-to-playlist and add-to-collection entries in the item's "..." menu render with data-id="playlist"/data-id="addtocollection", not data-action="addtoplaylist"/"addtocollection" as previously assumed — that selector matched an unrelated list-row button and never hid the actual menu items. Target the correct attribute so both are hidden. Also drop the specific plugin name from the guest-hidden-selectors description in favor of generic wording; the default selector value is unchanged.
Cette révision appartient à :
@@ -45,8 +45,9 @@ public class PluginConfiguration : BasePluginConfiguration
|
||||
/// <summary>
|
||||
/// Gets or sets a comma-separated list of CSS selectors that are hidden from guest
|
||||
/// sessions in the web client. Used to suppress other plugins' injected UI (search
|
||||
/// bars, floating buttons) so a guest only sees the shared title. Defaults to the
|
||||
/// AI Search plugin's elements.
|
||||
/// bars, floating buttons) so a guest only sees the shared title. The default value
|
||||
/// hides the elements of a plugin that injects its own floating button and panel
|
||||
/// into the web client; edit or clear it to match whatever else you run.
|
||||
/// </summary>
|
||||
public string GuestHiddenSelectors { get; set; } = ".ais-fab,.ais-overlay,#ais-styles";
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
<div class="sl-field inputContainer" style="grid-column: 1 / -1;">
|
||||
<input is="emby-input" type="text" id="GuestHiddenSelectors" label="Guest hidden selectors (CSS, comma-separated)" />
|
||||
<div class="fieldDescription">Elements hidden from guest sessions, e.g. other plugins' buttons. Default hides the AI Search UI.</div>
|
||||
<div class="fieldDescription">Elements hidden from guest sessions, e.g. other plugins' buttons. The default hides a plugin I had installed that injects its own floating UI into the web client.</div>
|
||||
</div>
|
||||
|
||||
<div class="sl-field inputContainer">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var pluginId = '68540b76-ee74-436d-85ff-2abc884bbea6';
|
||||
var copyLabel = 'Copy Stream URL';
|
||||
var actionLabel = 'ShareLink';
|
||||
var clientVersion = '1.0.0-ui-modal-9';
|
||||
var clientVersion = '1.0.0-ui-modal-10';
|
||||
var allowedItemStorageKey = 'sharelinks.allowedItemId';
|
||||
var guestClassName = 'sharelinks-guest';
|
||||
var hiddenAttr = 'data-sharelinks-hidden';
|
||||
@@ -233,12 +233,15 @@
|
||||
+ ' body.' + guestClassName + ' .mainDrawerButton,'
|
||||
+ ' body.' + guestClassName + ' .headerSearchButton,'
|
||||
+ ' body.' + guestClassName + ' [data-action="addtoplaylist"],'
|
||||
+ ' body.' + guestClassName + ' [data-action="addtocollection"] { display: none !important; }'
|
||||
+ ' body.' + guestClassName + ' [data-action="addtocollection"],'
|
||||
+ ' body.' + guestClassName + ' [data-id="playlist"],'
|
||||
+ ' body.' + guestClassName + ' [data-id="addtocollection"] { display: none !important; }'
|
||||
+ ' body.' + guestClassName + ' .card,'
|
||||
+ ' body.' + guestClassName + ' #castCollapsible a,'
|
||||
+ ' body.' + guestClassName + ' .detailsGroupItem a,'
|
||||
+ ' body.' + guestClassName + ' .genresGroup a,'
|
||||
+ ' body.' + guestClassName + ' .studiosGroup a,'
|
||||
+ ' body.' + guestClassName + ' .itemTags a,'
|
||||
+ ' body.' + guestClassName + ' .mediaInfoItem a { pointer-events: none !important; cursor: default !important; }';
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
|
||||
+6
-5
@@ -62,11 +62,12 @@ gone.
|
||||
## Hiding other plugins from guests
|
||||
|
||||
If you run other plugins that inject their own UI into the web client (a search
|
||||
bar, a floating button), you probably do not want a guest to see them. The
|
||||
**Guest hidden selectors** setting is a comma-separated list of CSS selectors
|
||||
that get hidden in guest sessions. It ships with a default that hides the
|
||||
[AI Search](https://github.com/Franciskid) button; add any other plugin's
|
||||
selector and it disappears for guests too, no code change needed.
|
||||
bar, a floating button), you probably do not want a guest to see them. I had
|
||||
exactly that problem with a different plugin of mine, so the **Guest hidden
|
||||
selectors** setting is a comma-separated list of CSS selectors that get hidden
|
||||
in guest sessions. It ships with a default that hides that plugin's floating
|
||||
button and panel; add any other plugin's selector and it disappears for guests
|
||||
too, no code change needed.
|
||||
|
||||
## Security stance
|
||||
|
||||
|
||||
+2
-2
@@ -10,10 +10,10 @@
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.0.0.0",
|
||||
"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 other plugins' UI.",
|
||||
"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": "4475c3952625eda228e70938293459cf",
|
||||
"checksum": "992bec11d21d0c4c1823ec32a7d325df",
|
||||
"timestamp": "2026-07-07T00:00:00Z"
|
||||
}
|
||||
]
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur