mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-03 10:54:55 +12:00
code review for aafb85c6c62a: use contentType
, instanceof document
is unreliable on Firefox
This commit is contained in:
parent
785b430263
commit
a9799b70bc
|
@ -473,7 +473,7 @@ var collapser = (function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
var morphNoscript = function(from) {
|
var morphNoscript = function(from) {
|
||||||
if ( document instanceof XMLDocument ) {
|
if ( /^application\/(?:xhtml\+)?xml/.test(document.contentType) ) {
|
||||||
var to = document.createElement('span');
|
var to = document.createElement('span');
|
||||||
while ( from.firstChild !== null ) {
|
while ( from.firstChild !== null ) {
|
||||||
to.appendChild(from.firstChild);
|
to.appendChild(from.firstChild);
|
||||||
|
|
Loading…
Reference in a new issue