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:
parent
f9092e0678
commit
fdccb5c915
7 changed files with 41 additions and 39 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue