Make ClientScript URL parsing robust against Jellyfin router changes
This commit is contained in:
@@ -100,8 +100,8 @@ namespace JellyfinPlugin.Api
|
||||
const video = document.querySelector('video');
|
||||
if (video && video !== currentVideoElement) {
|
||||
currentVideoElement = video;
|
||||
const params = new URLSearchParams(window.location.hash.split('?')[1]);
|
||||
const itemId = params.get('id') || params.get('itemId');
|
||||
const match = window.location.href.match(/[?&](id|itemId)=([^&#]+)/i);
|
||||
const itemId = match ? match[2] : null;
|
||||
|
||||
if (itemId) {
|
||||
fetch('/BlackBarRemover/CropById?itemId=' + itemId)
|
||||
|
||||
Reference in New Issue
Block a user