mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-05-20 20:23:37 +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) {
|
||||
if ( document instanceof XMLDocument ) {
|
||||
if ( /^application\/(?:xhtml\+)?xml/.test(document.contentType) ) {
|
||||
var to = document.createElement('span');
|
||||
while ( from.firstChild !== null ) {
|
||||
to.appendChild(from.firstChild);
|
||||
|
|
Loading…
Reference in a new issue