Skip to content

ニコニコ大百科のダークモード的な by gimmickgang

Screenshot of ニコニコ大百科のダークモード的な

Details

Authorgimmickgang

LicenseCC Zero

Categorydic.nicovideo.jp,ニコニコ大百科

Created

Updated

Size7.9 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

ニコニコ大百科のダークモード的なやつ

記事・掲示板内のお絵カキコなどの画像や動画ブログパーツなどのiframe、twitter引用の通常表示と反転表示を切り替えられる誰得機能をつけた

"文字を読みやすく"のチェックをオンにすると若干文字が読みやすい色に変わる

※見出しとかリストとかのアイコンとか下線とか→仕様

(いわゆるダークモードではない)

Notes

@version 1.0.0 リリース
@version 1.0.1 反転時の全体の色相を反対に変更 見出しアイコンとかリンク文字とかの違和感が軽減
@version 1.0.2 黒まな板背景とか全体の明るさとか(もう少し中身をスマートにしたい…)
@version 1.0.3 iframe部分適応外になる場合への対応

Source code

/* ==UserStyle==
@name           ニコニコ大百科のダークモード的な
@namespace      dic.nicovideo.jp
@version        1.0.3
@description    ニコニコ大百科のダークモード的なそうじゃないやつ
@author         gimmickgang
@preprocessor	stylus
@var            checkbox invert "ダークモードON" 1
@var            color bg-color "全体背景色" #474747
@var            checkbox bg-image "黒まな板" 0
@var            range brightness "全体の明るさ" [85, 75, 100, 5, `%`]
@var            range hue-rotate "全体の色相反転" [180, 0, 180, 180, `deg`]

@var            checkbox font-color "文字を少し読みやすくする" 0
@var            select image "画像の通常/反転" { "通常色 透過無し": "Return" , "通常色 透過有り*": "Return-Alpha" , "反転色 透過無し": "Invert" , "反転色 透過有り": "Invert-Alpha" }

@var            number NumberReturn "画像通常時 明るさ(数値が大きいとハッキリ)" [0.90, 0.75, 1.0, 0.025]
@var            number NumberInvert "画像反転時 明るさ(数値が小さいとハッキリ)" [0.2, 0.025, 0.25, 0.025]
@var            select twi "twitter引用 通常/反転" { "通常色": "Return" , "反転色*": "Invert" }
@var            select iframe "ブログパーツ 通常/反転" { "通常色": "Return" , "反転色": "Invert" }
@var            checkbox VideoPlus "ブログパーツ明るくする" 0
@var            select mce "エディタ内プレビュー 通常/反転" { "通常色": "Return" , "反転色": "Invert" }
==/UserStyle== */

@-moz-document url-prefix("https://dic.nicovideo.jp") {

	:root{
		--invert: invert(invert);
		--hue-rotate: hue-rotate(hue-rotate);
		--brightness: brightness(brightness);
		--invert005: invert(5%);

		--bg-color: bg-color;
		--bg-image: url(https://pbs.twimg.com/media/Fcew24kaMAAfxyB?format=png);

	}

	if invert=="1" {#basebody{ background: var(--bg-color) !important; } }
	if bg-image=="1" {#basebody,{ background-image: var(--bg-image) !important; } #header{background-image: url(/img/manaita1.png) !important;} }

	#header { background-color: #fff; background-image: none; }
	#contents, .search-box-wrapper, .st-button_cancel { filter: var(--invert) var(--hue-rotate) var(--brightness); }

	if font-color=="1" { #main { color: #111; } }

	.lazy-contents { filter: invert(1) hue-rotate(180deg); }

	if image=="Return" { .article_img, .index-oekaki-list-thumb img, .menu-oekaki_list-thumb img, .a-oekaki_list-thumb img, .st-bbs_contents-oekaki img, .my-oekaki_list-thumb img, .my-homeOekaki_list-thumb img { filter: invert(NumberReturn) hue-rotate(180deg) !important; background: #fff !important; } img[src$="/img/icon_homeru-wh.png"] { background: transparent !important; } }

	if image=="Return-Alpha" { .article_img, .index-oekaki-list-thumb img, .menu-oekaki_list-thumb img, .a-oekaki_list-thumb img, .st-bbs_contents-oekaki img, .my-oekaki_list-thumb img, .my-homeOekaki_list-thumb img { filter: invert(NumberReturn) hue-rotate(180deg) !important; } }

	if image=="Invert" { .article_img, .index-oekaki-list-thumb img, .menu-oekaki_list-thumb img, .a-oekaki_list-thumb img, .st-bbs_contents-oekaki img, .my-oekaki_list-thumb img, .my-homeOekaki_list-thumb img { filter: invert(NumberInvert) hue-rotate(180deg) !important; background: #fff !important; } img[src$="/img/icon_homeru-wh.png"] { background: transparent !important; } }

	if image=="Invert-Alpha" { .article_img, .index-oekaki-list-thumb img, .menu-oekaki_list-thumb img, .a-oekaki_list-thumb img, .st-bbs_contents-oekaki img, .my-oekaki_list-thumb img, .my-homeOekaki_list-thumb img { filter: invert(NumberInvert) hue-rotate(180deg) !important; } }

	if mce=="Return" { #nicopedia-article-textarea_ifr { filter: invert(1) hue-rotate(180deg); } }

	.a-piko_list-thumb img, .index-piko_thumb img, .menu-piko_player img, .st-space_top-middle img, .my-piko_list img, .my-homePiko_player img, .index-weekly-recommend-piko-info img, img[src$="/img/pikoplayer.png"], img[data-src$="/img/pikoplayer.png"] { filter: invert(15%) hue-rotate(180deg) !important; }

	.ftCLOc { transform: scale(0.6); transform-origin: -15px 0.5px; }

	.jhqmwf { filter: hue-rotate(180deg);}

	.nicovideo, .lazy-contents-iframe { filter: invert(80%) hue-rotate(180deg) !important; background: #fff !important; }

	.nicoichiba, .nicoichiba2 { filter: invert(90%) hue-rotate(180deg) !important; background: #fff !important; }

	if VideoPlus=="1" { .nicovideo { filter: invert(100%) hue-rotate(180deg) !important; background: #fff !important; }
			.nicoichiba, .nicoichiba2 { filter: invert(100%) hue-rotate(180deg) !important; background: #fff !important; } }

	if iframe=="Invert" { .nicovideo, .nicoichiba, .nicoichiba2 { filter: invert(5%) hue-rotate(0deg) !important; background: #fff !important; } }

	iframe[id^="twitter-widget-"] { filter: invert(5%) hue-rotate(0deg) !important; }

	if twi=="Return" { iframe[id^="twitter-widget-"]  { filter: invert(90%) hue-rotate(180deg) !important; } }


	footer { filter: invert(5%) hue-rotate(0deg); }

	.common-header-xwleqz, .common-header-6hj71y, .common-header-1ivnjlh { filter: invert(1) hue-rotate(180deg); }

	.common-header-6hj71y img, .common-header-1ivnjlh img { filter: invert(1) hue-rotate(180deg); }

	.header-logo { filter: invert(80%) hue-rotate(180deg) !important; }

	#search-cat, #search-dropdown, #sort-options, #new_category { filter: invert(80%) hue-rotate(180deg) !important; background: #444; color: #fff; }

	#scrollUp { background-color: #888; }

	.a-area_buttons, .a-infoArea_buttons, .st-bbsArea_buttons, .st-button_bbsRes, .st-button_premium, .index-button-article-create, .st-button_preview, .menu-oekaki_aria-home, .menu-piko_aria-home, #switchButtonSpan, .mce-floatpanel { filter: invert(0.9) hue-rotate(180deg); }

	.st-button_preview, .st-button_homeru, .st-button_nicoad, .a-button_watchlist, .st-button_editPiko, .st-button_editOrkaki { background-color: #000; }


	div#mceu_36 >button > i, div#mceu_37 >button > i, div#mceu_38 >button > i, div#mceu_44 >button > i, div#mceu_46 >button > i, div#mceu_51 >button > i { filter: invert(1) hue-rotate(180deg); }

	/* エディタ色設定ダイアログ◆◆色変更の影響なくすため◆◆ */
	.mce-start { filter: none; }

	.a-infoArea_buttons { color: #eee; }

	.st-button_editConfirm, .st-button_articleTitleEdit, .st-button_post, .st-button_save, .st-button_create { filter: invert(1) hue-rotate(180deg); background-color: #f90; }

	.a-list_relationSearch div:nth-child(3), .a-relationSearch div:nth-child(3) { filter: invert(0.9) hue-rotate(180deg); background: #fff !important; display: inline-block; padding: 0 5px; max-width: 185px; }

	.mobile-qr-code-container img { filter: invert(0.8) hue-rotate(180deg); }

	.search-boxl { filter: invert(0.9) hue-rotate(180deg); border-color: #3281fc !important; }

	#right-column { filter: invert(0.95) hue-rotate(180deg); }

	.__uz__article-img, .ad-bannar-maincolumn-top, .a-banner_middle, .adsense-728 td, .a-recommend_video-contenrs img, .a-recommend_seiga-contenrs img, .a-recommend_news-contents img, #dic_pc_468x60_north, #dic_pc_300x250_south_left, #dic_pc_300x250_south_right { filter: invert(0.9) hue-rotate(180deg); }

	.st-box_side, .twitter_nicopedia, .twitter-timeline, .twitter-forrow, .twitter_nicopedia p:before, .twitter-forrow a, .twitter-timeline iframe, .twitter-forrow a, .revisions td:nth-child(5) > span, iframe[allowfullscreen^="allowfullscreen"] { filter: invert(1) hue-rotate(180deg); }

}

@-moz-document url-prefix("https://dic.nicovideo.jp/prev_sp.html") {

	.article_img, .nicovideo, .nicoichiba, .nicoichiba2, iframe[id^="twitter-widget-"]  { filter: none !important; background-color: transparent !important; }

}

Reviews

No reviews yet.