-
-
Save eggplants/8d280e079ecd7bdda21f34cd99b5fd76 to your computer and use it in GitHub Desktop.
http://bunkai-kei.com/ の試聴プレイヤーを dewplayer(Flash 製)から HTML5 Audio に置き換えるUserscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Restore Bnkaikei Player | |
// @namespace http://github.com/ | |
// @version 0.1 | |
// @description Replace Bunkaikei's swf player to html one. | |
// @author KOBA789 (modified: eggplants) | |
// @homepage https://github.com/eggplants | |
// @match http://bunkai-kei.com/release/* | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
"use strict"; | |
[...document.querySelectorAll('object[data*="/dewplayer.swf"]')].forEach( | |
(dew) => { | |
const a = new Audio(new URL(dew.data).searchParams.get("mp3")); | |
a.controls = true; | |
a.style.width = "200px"; | |
a.style.height = "20px"; | |
dew.replaceWith(a); | |
} | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment