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