Allow removing max page width restriction

This commit is contained in:
Jaifroid 2025-05-21 18:30:22 +01:00
parent 9570687894
commit d105bf5e48
2 changed files with 10 additions and 1 deletions

View File

@ -4106,7 +4106,6 @@ This impacts language button and talk add topic. */
}
@media screen and (min-width: 1120px) {
.mw-body {
display: grid;
grid-template: min-content min-content min-content 1fr / minmax(0, 59.25rem) min-content;
/**
* NOTE: T327715 - 'titlebar-cx' grid area is a temporary workaround to accommodate

View File

@ -2684,6 +2684,16 @@ function removePageMaxWidth () {
}
docStyle.margin = '0 auto';
}
// Remove class key "mw-page-container-inner" from any element with that class (for actionparse ZIMs)
var actionParseRemoveClasses = ['mw-page-container-inner', ''];
for (i = 0; i < actionParseRemoveClasses.length; i++) {
var mwPageContainer = doc.getElementsByClassName(actionParseRemoveClasses[i]);
if (mwPageContainer && mwPageContainer.length) {
for (var j = 0; j < mwPageContainer.length; j++) {
mwPageContainer[j].classList.remove(actionParseRemoveClasses[i]);
}
}
}
if (doc.body && doc.body.classList.contains('article-list-home')) {
doc.body.style.padding = '2em';
}