1300

移行用のテストです

ニコニコ動画で再生前動画広告を飛ばすボタン設置

// ==UserScript==
// @name         nico_skip_button
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.nicovideo.jp/watch/sm*
// @grant        none
// ==/UserScript==
var result = document.evaluate('//ul[@class="TagList"]', document, null, 7, null);
result.snapshotItem(0).insertAdjacentHTML("beforeend", "<a href='javascript:void(0);'><img src='https://cdn-ak.f.st-hatena.com/images/fotolife/j/jigendaddy/20181027/20181027181215.png'></a>");
var result2 = document.evaluate('//ul[@class="TagList"]/a', document, null, 7, null);
result2.snapshotItem(0).addEventListener('click', sample, false);

function sample() {
  var result3 = document.evaluate('descendant::video[2]', document, null, 7, null);
  result3.snapshotItem(0).src = "";
}