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');
|
const video = document.querySelector('video');
|
||||||
if (video && video !== currentVideoElement) {
|
if (video && video !== currentVideoElement) {
|
||||||
currentVideoElement = video;
|
currentVideoElement = video;
|
||||||
const params = new URLSearchParams(window.location.hash.split('?')[1]);
|
const match = window.location.href.match(/[?&](id|itemId)=([^&#]+)/i);
|
||||||
const itemId = params.get('id') || params.get('itemId');
|
const itemId = match ? match[2] : null;
|
||||||
|
|
||||||
if (itemId) {
|
if (itemId) {
|
||||||
fetch('/BlackBarRemover/CropById?itemId=' + itemId)
|
fetch('/BlackBarRemover/CropById?itemId=' + itemId)
|
||||||
|
|||||||
Reference in New Issue
Block a user