Fix breaking styles
This commit is contained in:
parent
6a7f1cfe0b
commit
b178881cab
@ -12144,13 +12144,13 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
node = nodes[i];
|
node = nodes[i];
|
||||||
if (!(node.nodeName === 'STYLE' && !node.id)) {
|
if (node.nodeName === 'STYLE' && node.id) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (("" + node.rel).contains('stylesheet') && (/flags.*\.css$/.test(href = node.href) || href.slice(0, 4) === 'data')) {
|
if (/stylesheet/.test(node.rel) && (/flags.*\.css$/.test(href = node.href) || href.slice(0, 4) === 'data')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (/\b(\.typeset)/.test(node.textContent)) {
|
if (/\.typeset/.test(node.textContent)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Style.headCount--;
|
Style.headCount--;
|
||||||
|
|||||||
@ -12136,13 +12136,13 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
node = nodes[i];
|
node = nodes[i];
|
||||||
if (!(node.nodeName === 'STYLE' && !node.id)) {
|
if (node.nodeName === 'STYLE' && node.id) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (("" + node.rel).contains('stylesheet') && (/flags.*\.css$/.test(href = node.href) || href.slice(0, 4) === 'data')) {
|
if (/stylesheet/.test(node.rel) && (/flags.*\.css$/.test(href = node.href) || href.slice(0, 4) === 'data')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (/\b(\.typeset)/.test(node.textContent)) {
|
if (/\.typeset/.test(node.textContent)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Style.headCount--;
|
Style.headCount--;
|
||||||
|
|||||||
@ -114,9 +114,9 @@ Style =
|
|||||||
return unless Style.headCount
|
return unless Style.headCount
|
||||||
node = nodes[i]
|
node = nodes[i]
|
||||||
|
|
||||||
continue unless node.nodeName is 'STYLE' and !node.id
|
continue if 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')
|
or (/stylesheet/.test(node.rel) and (/flags.*\.css$/.test(href = node.href) or href[..3] is 'data'))
|
||||||
continue if /\b(\.typeset)/.test node.textContent
|
or (/\.typeset/.test node.textContent)
|
||||||
|
|
||||||
Style.headCount--
|
Style.headCount--
|
||||||
$.rm node
|
$.rm node
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user