..
This commit is contained in:
@@ -56,7 +56,6 @@ modification_rules:
|
|||||||
if (document.title === "Jellyfin") {
|
if (document.title === "Jellyfin") {
|
||||||
document.title = "SpaceCloud - Cinema";
|
document.title = "SpaceCloud - Cinema";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a MutationObserver to prevent any changes to the title
|
// Create a MutationObserver to prevent any changes to the title
|
||||||
const observer = new MutationObserver(function (mutations) {
|
const observer = new MutationObserver(function (mutations) {
|
||||||
mutations.forEach(function (mutation) {
|
mutations.forEach(function (mutation) {
|
||||||
@@ -68,10 +67,8 @@ modification_rules:
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Observe the document title for changes
|
// Observe the document title for changes
|
||||||
observer.observe(document.querySelector('title'), { childList: true });
|
observer.observe(document.querySelector('title'), { childList: true });
|
||||||
|
|
||||||
// Set up a fallback in case of attempts to change the title through direct assignment
|
// Set up a fallback in case of attempts to change the title through direct assignment
|
||||||
Object.defineProperty(document, 'title', {
|
Object.defineProperty(document, 'title', {
|
||||||
set: function (value) {
|
set: function (value) {
|
||||||
|
Reference in New Issue
Block a user