Browse Source

code review for aafb85c6c62a: use `contentType`, `instanceof document` is unreliable on Firefox

pull/2/head
Raymond Hill 7 years ago
parent
commit
a9799b70bc
No known key found for this signature in database GPG Key ID: 25E1490B761470C2
  1. 2
      src/js/contentscript.js

2
src/js/contentscript.js

@ -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…
Cancel
Save