1
0
Fork 0
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:
Raymond Hill 2018-01-20 16:37:40 -05:00
parent 785b430263
commit a9799b70bc
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -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);