MDN: Content first (Header to Footer)

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

当前为 2021-08-20 提交的版本,查看 最新版本

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

You will need to install an extension such as Tampermonkey to install this script.

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

您需要先安装一个扩展,例如 篡改猴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.4
@license        CC0 - Public Domain
==/UserStyle== */
@-moz-document domain("developer.mozilla.org") {
 /*
    https://greasyfork.org/en/scripts/409087/versions/new
    2020-12-15 they switched to "signle column grid"
    With explicity set template-row, that matches matural source order.
    Makes no sense to me. Education? Showing off? Questions…
    You know what?
    Flexbox is fine. I think. Natural order, no need to keep track, no overlays.
    2021-03-11 switched to shallow grid with aside and main besides each other
  */
 /*
 § First row (header): move after content
  both header and footer have z-index of 9999
  https://github.com/mdn/yari/blob/c8e3837e2646d4433ad97899afcbd1ced94e3b0f/client/src/ui/organisms/header/index.scss#L58
  increasing is necessary foro dropdowns to not be covered with following footer
 */
 .document-page .page-header {
  grid-row: 8/9; /* was 1/2 */
  z-index: 10000;
 }
 /*
 § Breadcrumbs: stick to top
 */
 .breadcrumb-locale-container {
  margin: 0;
 }
 /* 
 § Breadcrumbs: Hide last (current) item
 Redundant: URL is already in location bar, text is in H1
 * OFF /
 .breadcrumb-locale-container nav li:nth-last-child(1) {
  display: none;
 }
 .breadcrumb-locale-container nav li:nth-last-child(2) a::after{
  --REM: 'caron separator';
  content: none;
 }
 /* */
}