-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
keymap-toggle-subtitle.js
1 lines (1 loc) · 1.09 KB
/
keymap-toggle-subtitle.js
1
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/keymap-toggle-subtitle"]=t():e["utils/keymap-toggle-subtitle"]=t()}(globalThis,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{plugin:()=>i});const o=coreApis.componentApis.video.playerAgent,i={name:"keymap.actions.toggleSubtitle",displayName:"快捷键扩展 - 开关 CC 字幕",description:'在快捷键的动作列表里添加一个 "开关 CC 字幕".',setup:e=>{let{addData:t}=e;t("keymap.actions",(e=>{e.toggleSubtitle={displayName:"开关 CC 字幕",run:async()=>{const e=o.playerAgent.query.control.buttons.subtitle.sync();return e?.click(),e}}})),t("keymap.presets",((e,t)=>{e.toggleSubtitle="shift c",t.YouTube.toggleSubtitle="c",t.YouTube.coin="",t.PotPlayer.toggleSubtitle="alt h"}))},commitHash:"7c8d2d25a7584936f8d774de7ffd253124adf620",coreVersion:"2.9.4"};return t=t.plugin})()));