Exclude footnotes and highlights from width overrides
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
<script>
|
||||
function paigeResize() {
|
||||
var e = document.querySelector('body > div.container');
|
||||
var s = getComputedStyle(e);
|
||||
var px = parseFloat(s.paddingLeft) + parseFloat(s.paddingRight);
|
||||
var bx = parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth);
|
||||
var w = e.offsetWidth - px - bx;
|
||||
var es = document.querySelectorAll('section[class="paige-content"] > div');
|
||||
var s = document.querySelector('section[class="paige-content"]');
|
||||
var mw = getComputedStyle(s).maxWidth;
|
||||
var w;
|
||||
if (mw === "none") {
|
||||
var e = document.querySelector("body > div.container");
|
||||
var s = getComputedStyle(e);
|
||||
var px = parseFloat(s.paddingLeft) + parseFloat(s.paddingRight);
|
||||
var bx = parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth);
|
||||
w = e.offsetWidth - px - bx;
|
||||
} else {
|
||||
w = parseFloat(mw.substring(0, mw.length - 2));
|
||||
}
|
||||
var es = document.querySelectorAll('section[class="paige-content"] > div:not([class="footnotes"], [class="highlight"])');
|
||||
for (var i = 0; i < es.length; i++) {
|
||||
var e = es[i];
|
||||
if (e.offsetWidth !== w) {
|
||||
|
Reference in New Issue
Block a user