Skip to content

Instantly share code, notes, and snippets.

@mfmfuyu
Last active August 24, 2024 14:29
Show Gist options
  • Save mfmfuyu/6fb6457fc26841a22e0fd211f5b8529c to your computer and use it in GitHub Desktop.
Save mfmfuyu/6fb6457fc26841a22e0fd211f5b8529c to your computer and use it in GitHub Desktop.
ニコニコ動画の視聴ページをいい感じにするやつ - At your own risk.
/* ==UserStyle==
@name www.nicovideo.jp/watch
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document url-prefix("https://www.nicovideo.jp/watch") {
[aria-label="nicovideo-content"] > section {
grid-template-areas: "player player" "meta sidebar" "bottom sidebar" ". sidebar";
grid-template-columns: 1fr var(--sizes-watch-sidebar-width);
}
.grid-area_\[bottom\],
.grid-area_\[meta\] {
/* temp fix */
width: calc(100vw - var(--sizes-watch-sidebar-width) - var(--spacing-x3) * 4);
}
.grid-area_\[player\] > div > div {
margin: 0 auto;
width: calc(var(--watch-player-height-by-browser) * 1.77777777778);
max-width: var(--watch-player-possible-width);
}
/* Player setting panel fix */
.grid-area_\[sidebar\] {
position: relative;
}
[aria-label="プレーヤー設定"] {
position: absolute !important;
top: 0 !important;
left: auto !important;
right: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment