(()=>(t,a)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")||!getUID()){return}const{playerReady:t}=await a.importAsync("player-ready");await t();const e=dq(".video-toolbar .ops .collect");if(!e){return}a.applyStyle("outerWatchlaterStyle");e.insertAdjacentHTML("afterend",`\n\n\n稍后再看\n
{{ tipText }}
\n
\n`.trim());const i=dq(".ops .watchlater");if(!i){return}const s=new Vue({el:i,store:store,data:{aid:unsafeWindow.aid,tipText:"",tipShowing:false,tipHandle:0},computed:{...Vuex.mapState(["watchlaterList"]),isInWatchlater(){return this.watchlaterList.includes(parseInt(this.aid))}},methods:{...Vuex.mapActions(["toggleWatchlater"]),showTip(t){this.tipText=t;this.tipShowing=true;if(this.tipHandle){clearTimeout(this.tipHandle)}this.tipHandle=setTimeout((()=>{this.tipShowing=false}),2e3)},async toggle(){await this.toggleWatchlater(this.aid);this.showTip(this.isInWatchlater?"已添加至稍后再看":"已从稍后再看移除")}}});Observer.videoChange((()=>{s.aid=unsafeWindow.aid}))})();return{unload:()=>{dqa(".ops .watchlater").forEach((t=>t.style.display="none"))},reload:()=>{dqa(".ops .watchlater").forEach((t=>t.style.display="inline-block"))}}})();