本帖最后由 木羊羽 于 2022-11-5 09:50 编辑
同样的代码在edge中无法运行,在chrome中就可以搞不懂啊,哥哥们帮帮我😭😭
https://www.bilibili.com/video/BV15D4y1k7VX
https://greasyfork.org/zh-CN/scripts/424638


// 按下enter键进出全屏
function tool_3() {
window.addEventListener('keydown', (e) => {
get_focus = document.activeElement
if (e.key == "Enter") {
// 判断是否是在搜索框
if (get_focus.className.includes('nav-search-input') == false) {
let fullscreen_btn = document.querySelector('.bpx-player-ctrl-full')
fullscreen_btn.click()
}
}
})
}