Skip to content

空span捜索 by gimmickgang

Screenshot of 空span捜索

Details

Authorgimmickgang

LicenseCC0

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

Created

Updated

Size3.1 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

ニコニコ大百科の記事中の空spanを見つける
廃止になったニコニコ市場のiframeがある場合も見つける

Notes

ニコニコ大百科の記事本文中の空<span>を見つけます

  • 設定メニューのチェック切り替えにより当該箇所に<span>表示が出ます。
  • 空spanのある記事では記事名表示部下に「空<span>有り」と表示されます

FireFoxでは2023/12/19にリリース予定のFirefox 121へのバージョンアップ以降で「空<span>有り」表示されるようになります

@ver 2023.1203.2230 新規
@ver 2023.1203.2355 除外指定「〇〇」を好きなユーザーが配信中! 欄を追加(除外指定漏れ)
@ver 2023.1204.0530 ニコニコ市場iframeがあるときのアラートも追加(画像化) アラートのイメージ画像
@ver 2023.1206.6000 記事本文中の<p></p>箇所の表示オプション追加
@ver 2024.0422.0215 除外指定 新ニコニ広告枠 欄に対応(空span判定)

Source code

/* ==UserStyle==
@name           空span捜索
@namespace      userstyles.world/user/gimmickgang
@version        2024.0422.0215
@description    ニコニコ大百科の記事中の空spanを見つける
@author         https://twitter.com/gimmickgang
@var            checkbox SpanCheck "文中の空span箇所の表示" 0
@var            checkbox EmptyP_Check "<p></p>の表示" 0
@preprocessor	stylus
==/UserStyle== */
@-moz-document url-prefix("https://dic.nicovideo.jp/") {
 .article:has(span:not([style]):not(.st-button_homeru-text):not(.st-button_nicoad-text):not(#mobile-qr-code):not(#new-article-title-explanation):not(#article_already_exists):not(#undefined_error):not(#user_is_not_premium):not(.a-sukinamono_live-user a span):not(#nicoad_users_article_pc span)) {
  --blank-span-alert-width: 135px;
  --blank-span-alert-height: 38px;
  --blank-span-alert-shift: -0px;
 }

 .a-contents:has(iframe[class^="nicoichiba2"]), .a-contents:has(iframe[class^="nicoichiba"]), .sw-Article_Body-inner:has(iframe[class^="nicoichiba2"]), .sw-Article_Body-inner:has(iframe[class^="nicoichiba"]) {
  --ichiba-iframe-alert-width: 165px;
  --ichiba-iframe-alert-height: 38px;
  --ichiba-iframe-alert-shift: -135px;
 }

 .article::before {
  content: "";
  display: block;
  width: calc(var(--blank-span-alert-width, 0px) + var(--ichiba-iframe-alert-width, 0px));
  height: calc(var(--blank-span-alert-height, 0px) + var(--ichiba-iframe-alert-height, 0px));
  max-height: 38px;
  background-position: calc(var(--ichiba-iframe-alert-shift, 0px) + var(--blank-span-alert-shift, 0px)) 0px;
  background-image: url(https://lohas.nicoseiga.jp/thumb/11322518i);
 }

 if SpanCheck=="1" {
  .article span:not([style])::before {
   content: "<span>";
   background: yellow;
   font-weight: bold;
   color: red;
  }

  /* 除外指定 */
  .a-bottomMenu .a-infoArea_buttons span::before, #mobile-qr-code::before, #new-article-title-explanation::before, #article_already_exists::before, #undefined_error::before, #user_is_not_premium::before, section#sukinamono_lives span::before, #nicoad_users_article_pc span::before {
   content: "";
  }
 }

 if EmptyP_Check=="1" {
  div.article p:empty {
   margin-top: 5px;
   margin-bottom: 5px;
   line-height: 1;
  }

  div.article p:empty::before {
   background: red;
   color: #fff;
   font-weight: bold;
   content: "<p></p>";
   font-size: 10px;
   line-height: 1em;
   padding: 1px 5px;
   border-radius: 5px;
  }

  div.article #nicoad_users_article_pc p::before {
   content: "";
   background: revert;
   color: revert;
   font-weight: revert;
   font-size: revert;
   line-height: revert;
   padding: revert;
   border-radius: revert;
  }
 }
}

@-moz-document url-prefix("https://dic.nicovideo.jp/p/") {
 if EmptyP_Check=="1" {
  div.article p:last-child:empty::before {
   content: "";
   background: revert;
   color: revert;
   font-weight: revert;
   font-size: revert;
   line-height: revert;
   padding: revert;
   border-radius: revert;
  }
 }
}

Reviews

No reviews yet.