globalSpeed icon indicating copy to clipboard operation
globalSpeed copied to clipboard

视频”上/下集“&”弹幕开/关“功能需求

Open Hefang2000 opened this issue 2 years ago • 2 comments

尊敬的开发者 贵方的拓展“Global Speed”十分强,但是我不怎么懂“创建”如何用,需要帮助与指导。 同时是否能够/如何添加“前、后集”,以及“开/关弹幕”的快捷功能?

Hefang2000 avatar Mar 12 '22 11:03 Hefang2000

Hello. Apologies for the late reply. Several people suggested a next/previous shortcut, but there is no good way to implement this. Every website handles next/previous differently and I try avoiding implementing website specific stuff. That's also why there won't be a barrage hotkey by default.

To create a barrage hotkey for Bilibili using custom javascript hotkey...

  1. Create a "Javascript" shortcut.
  2. Set the shortcut key to whatever you want. For example, the "T" key.
  3. Set the javascript code to -> document.querySelector(".bilibili-player-video-danmaku-switch.bui.bui-switch > input")?.click()
  4. Once the T key is pressed, the barrage should toggle on/off.

Video walkthrough attached. It might not be visible if you view this through email.

https://user-images.githubusercontent.com/31208859/158188113-1439ec55-b5c7-4ea6-b01c-febf76de3fc5.mov

polywock avatar Mar 14 '22 14:03 polywock

非常感谢您提供的 javascript code 用于开/关哔哩哔哩弹幕 但是有些遗憾的是这个 javascript code 仅支持哔哩哔哩平台up投放的视频,而对于哔哩哔哩的”动漫“,”电影“等就爱莫能助了 谢谢您的启发,通过查看网页元素结合您提供的方式,问题已经得到解决 只需要将原有的 javascript code :document.querySelector(".bilibili-player-video-danmaku-switch.bui.bui-switch > input")?.click()更改为 : document.querySelector(".bui-switch-input")?.click()即可。这样就不局限于平台u 的短视频了 image

Hefang2000 avatar Mar 19 '22 06:03 Hefang2000