diff --git a/extension/keysocket-bahamut-animation.js b/extension/keysocket-bahamut-animation.js new file mode 100644 index 0000000..f32c56c --- /dev/null +++ b/extension/keysocket-bahamut-animation.js @@ -0,0 +1,17 @@ +keySocket.init( + "bahamut-animation", + { + "play-pause": function () { + var agreeButton = document.querySelector(".choose-btn-agree"); + if (agreeButton) { + keySocket.simulateClick(agreeButton); + } else { + var playPauseButton = document.querySelector("#ani_video button.vjs-play-control.vjs-control.vjs-button"); + keySocket.simulateClick(playPauseButton); + } + }, + "prev": "#ani_video button.vjs-pre-button", + "next": "#ani_video button.vjs-next-button" + // stop is omitted + } +); \ No newline at end of file diff --git a/extension/manifest.json b/extension/manifest.json index 4002ffb..39a2a00 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -76,6 +76,10 @@ "matches": ["https://developer.apple.com/videos*"], "js": ["plugin-api.js", "keysocket-apple-developer.js"] }, + { + "matches": ["*://ani.gamer.com.tw/animeVideo.php*"], + "js": ["plugin-api.js", "keysocket-bahamut-animation.js"] + }, { "matches": ["*://*.bandcamp.com/*"], "js": ["plugin-api.js", "keysocket-bandcamp.js"]