codesandbox.io: collapse header for larger editor

Pull header and social buttons to side panel

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

/* ==UserStyle==
@name           codesandbox.io: collapse header for larger editor
@namespace      myfonj
@version        1.0.0
@description    Pull header and social buttons to side panel
@author         myf
@license        CC0
==/UserStyle== */

/*
https://greasyfork.org/en/scripts/441676/versions/new
*/

@-moz-document domain("codesandbox.io") {
 /* categorisation */
}
@-moz-document url-prefix("https://codesandbox.io/s/") {
 header:not(:hover):not(:focus-within) {
   width: 55px;
   overflow: hidden;
 }
 header:not(:hover):not(:focus-within) a[href="/dashboard"] {
  opacity: 0;
 }
 header {
  z-index: 100;
  position: fixed;
  right: auto;
  left: 0;
 }
 /* reclaim header space */
 nav[aria-label="Sandbox Navigation"] + div {
  top: 0 !important;
 }
 /* sweep social buttons to panel */
 nav[aria-label="Sandbox Navigation"] + div > .SplitPane > .Pane1 > [class*="elements__Container"] > :last-child {
  position: fixed;
  bottom: .33em; left: .33em;
  display: flex;
  flex-direction: column;
 }
 nav[aria-label="Sandbox Navigation"] + div > .SplitPane > .Pane1 > [class*="elements__Container"] > :last-child  > div {
  display: contents;
 }
}