1300

移行用のテストです

AbemaTVで音量調節用スライダー設置

// ==UserScript==
// @name         abema_volume
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://abema.tv/*
// @grant        none
// ==/UserScript==
var result3 = document.evaluate('//input[@name="search"]', document, null, 7, null);
result3.snapshotItem(0).addEventListener('change', function () {
  if (result3.snapshotItem(0).value == "vol") {
    var result = document.evaluate('//video', document, null, 7, null);
    var result2 = document.evaluate('//header/p', document, null, 7, null);
    result2.snapshotItem(0).insertAdjacentHTML('afterend', '<input type="range" name="example" step="5" max="100" id="hoge">');
    document.getElementById("hoge").addEventListener('change', function () {
      for (var i = 0; i < result.snapshotLength; i++) {
        result.snapshotItem(i).volume = document.getElementById("hoge").value / 100;
        this.title = document.getElementById("hoge").value + "%";
      }
    }, false);
  }
});
input[type=range]::-moz-range-thumb {
  /*background-color: lime;*/
    border:none;
  border-radius:50%;
}