More or less fix #373

Some parts will be discolored. Not really my fault.
This commit is contained in:
Zixaphir 2013-08-18 08:15:18 -07:00
parent 162f125e43
commit 6a7f1cfe0b
3 changed files with 27 additions and 9 deletions

View File

@ -12144,11 +12144,18 @@
return; return;
} }
node = nodes[i]; node = nodes[i];
if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && !/flags.*\.css$/.test(href = node.href) && href.slice(0, 4) !== 'data')) { if (!(node.nodeName === 'STYLE' && !node.id)) {
continue;
}
if (("" + node.rel).contains('stylesheet') && (/flags.*\.css$/.test(href = node.href) || href.slice(0, 4) === 'data')) {
continue;
}
if (/\b(\.typeset)/.test(node.textContent)) {
continue;
}
Style.headCount--; Style.headCount--;
$.rm(node); $.rm(node);
} }
}
}, },
matrix: function(foreground, background) { matrix: function(foreground, background) {
var bg, bgHex, fg, fgHex; var bg, bgHex, fg, fgHex;

View File

@ -12136,11 +12136,18 @@
return; return;
} }
node = nodes[i]; node = nodes[i];
if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && !/flags.*\.css$/.test(href = node.href) && href.slice(0, 4) !== 'data')) { if (!(node.nodeName === 'STYLE' && !node.id)) {
continue;
}
if (("" + node.rel).contains('stylesheet') && (/flags.*\.css$/.test(href = node.href) || href.slice(0, 4) === 'data')) {
continue;
}
if (/\b(\.typeset)/.test(node.textContent)) {
continue;
}
Style.headCount--; Style.headCount--;
$.rm(node); $.rm(node);
} }
}
}, },
matrix: function(foreground, background) { matrix: function(foreground, background) {
var bg, bgHex, fg, fgHex; var bg, bgHex, fg, fgHex;

View File

@ -113,7 +113,11 @@ Style =
while i-- while i--
return unless Style.headCount return unless Style.headCount
node = nodes[i] node = nodes[i]
if (node.nodeName is 'STYLE' and !node.id) or ("#{node.rel}".contains('stylesheet') and !/flags.*\.css$/.test(href = node.href) and href[..3] isnt 'data')
continue unless node.nodeName is 'STYLE' and !node.id
continue if "#{node.rel}".contains('stylesheet') and (/flags.*\.css$/.test(href = node.href) or href[..3] is 'data')
continue if /\b(\.typeset)/.test node.textContent
Style.headCount-- Style.headCount--
$.rm node $.rm node
return return