MDN: Content first (Header to Footer)

Moves main content to the top, so the header with dropdown menus lands above footer.

当前为 2020-08-19 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

/* ==UserStyle==
@name           MDN: Content first (Header to Footer)
@description    Moves main content to the top, so the header with dropdown menus lands above footer.
@namespace      myfonj
@version        1.0.1
@license        CC0 - Public Domain
==/UserStyle== */

@-moz-document domain("developer.mozilla.org") {
	/*
		https://greasyfork.org/en/scripts/409087/versions/new

		body
			div#react-container[data-component-name="SPA"]
				..
				ul#nav-access
				header
				main[role="main"]
				footer
	*/
	body > #react-container {
		display: flex;
		flex-direction: column;
	}
	body > #react-container > main {
		order: -1;
	}
	body > #react-container > header {
		border-top: 2px solid #3d7e9a
	}
	/*
		compact Edit button
		<div class="titlebar">
			<h1 class="title">..</h1>
			<a class="button neutral" href="https://wiki.developer.mozilla.org/.." rel="nofollow">
				<svg class="icon icon-pencil" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 26" aria-hidden="true">
					<path d="..">
					</path>
				</svg>
				Edit in wiki
			</a>
		</div>	
	*/
	h1.title + .button {
		min-height: auto;
		padding: 0.5rem
	}
	h1.title + .button > svg {
		float: right;
		margin-left: 0.5rem;
	}
	h1.title + .button:not(:hover):not(:focus) {
		color: transparent;
		background-color: transparent;
		border-color: transparent;
	}
	h1.title + .button:not(:hover):not(:focus) > svg {
		color: black;
		margin-left: 0.0rem;
	}
}