Jump to content

User:Jdlrobson/responsiveVector2022.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
var viewport = document.querySelector( 'meta[name="viewport"]' );
if ( viewport ) {
	viewport.setAttribute( 'content', 'width=device-width, initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, maximum-scale=5.0' );
	mw.util.addCSS(`
@media ( max-width: 500px ) {
	.vector-header {
		flex-flow: column;
		align-items: start;
	}
	.vector-header-end {
		align-self: end;
	}
	.vector-header-container,
	.mw-page-container {
		min-width: auto !important;
	}
	img, table {
		max-width: 100% !important;
	}
}
	`)
}