4,554
edits
No edit summary |
No edit summary |
||
Line 1,438: | Line 1,438: | ||
borderPref | borderPref | ||
); | ); | ||
})(); | |||
// DIAG 1: dump computed border style on the chosen wrapper | |||
(function () { | |||
var wrapper = | |||
doc.querySelector(".entry-wrapper") || | |||
doc.querySelector(".print-a4-narrow") || | |||
doc.body.firstElementChild; | |||
if (!wrapper) return; | |||
var cs = doc.defaultView.getComputedStyle(wrapper); | |||
console.log( | |||
"[swprint] computed border:", | |||
cs.borderTopWidth, | |||
cs.borderTopStyle, | |||
cs.borderTopColor, | |||
"|", | |||
cs.borderRightWidth, | |||
cs.borderRightStyle, | |||
cs.borderRightColor, | |||
"|", | |||
cs.borderBottomWidth, | |||
cs.borderBottomStyle, | |||
cs.borderBottomColor, | |||
"|", | |||
cs.borderLeftWidth, | |||
cs.borderLeftStyle, | |||
cs.borderLeftColor | |||
); | |||
})(); | |||
// DIAG 2: optional loud border, easy to see (comment out after testing) | |||
(function () { | |||
if (borderPref === "with") { | |||
var wrapper = | |||
doc.querySelector(".entry-wrapper") || | |||
doc.querySelector(".print-a4-narrow") || | |||
doc.body.firstElementChild; | |||
if (!wrapper) return; | |||
// Strong visual to prove it’s applied; remove once confirmed | |||
wrapper.style.border = "2px dashed red !important"; | |||
console.log("[swprint] TEMP diagnostic border applied (red dashed)"); | |||
} | |||
})(); | })(); | ||