1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix inconsistent naming formats

This commit is contained in:
Bill Thornton 2024-10-17 01:23:38 -04:00
parent f9092e0678
commit fdccb5c915
7 changed files with 41 additions and 39 deletions

View file

@ -12,8 +12,8 @@
(function (DOMParser) {
'use strict';
const DOMParser_proto = DOMParser.prototype;
const real_parseFromString = DOMParser_proto.parseFromString;
const DOMParserPrototype = DOMParser.prototype;
const realParseFromString = DOMParserPrototype.parseFromString;
// Firefox/Opera/IE throw errors on unsupported types
try {
@ -24,13 +24,13 @@
}
} catch (ex) { /* noop */ }
DOMParser_proto.parseFromString = function (markup, type) {
DOMParserPrototype.parseFromString = function (markup, type) {
if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
const doc = document.implementation.createHTMLDocument('');
doc.documentElement.innerHTML = markup;
return doc;
} else {
return real_parseFromString.apply(this, arguments);
return realParseFromString.apply(this, arguments);
}
};
}(DOMParser));