Nico User Ads Hider

ニコニ広告による動画への装飾を削除

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Nico User Ads Hider
// @namespace   http://userscripts.org/users/121129
// @description ニコニ広告による動画への装飾を削除
// @match       *://www.nicovideo.jp/video_top*
// @match       *://www.nicovideo.jp/tag/*
// @match       *://www.nicovideo.jp/search/*
// @match       *://www.nicovideo.jp/ranking*
// @version     12
// @grant       none
// ==/UserScript==

;(function() {
  'use strict'
  const css = `
    /* 検索結果 */
    .video [data-nicoad-grade="gold"] .itemThumbWrap::before,
    .video [data-nicoad-grade="silver"] .itemThumbWrap::before {
      all: initial;
    }

    /* 動画TOP */
    /* ランキング */
    [data-nicoad-grade="gold"] .Thumbnail.VideoThumbnail,
    [data-nicoad-grade="silver"] .Thumbnail.VideoThumbnail {
      background: inherit;
    }
    [data-nicoad-grade="silver"] .Thumbnail.VideoThumbnail::after,
    [data-nicoad-grade="gold"] .Thumbnail.VideoThumbnail::after {
      background-image: initial;
    }
    [data-nicoad-grade] .Thumbnail.VideoThumbnail .Thumbnail-image {
      margin: 0px;
      background-size: 100%;
    }
    [data-nicoad-grade="gold"] .NC-NicoadFrame::after,
    [data-nicoad-grade="silver"] .NC-NicoadFrame::after,
    .NC-NicoadFrame_gold::after,
    .NC-NicoadFrame_silver::after {
      display: none;
    }
  `
  const style = document.createElement('style')
  style.id = 'NicoUserAdsHiderStyle'
  style.textContent = css
  document.head.appendChild(style)
})()