(()=>(t,e)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")||!getUID()){return}await playerReady();const t=dq(".video-toolbar .ops .collect");if(!t){return}e.applyStyle("outerWatchlaterStyle");t.insertAdjacentHTML("afterend",`\n\n\n 稍后再看\n
{{tipText}}
\n
\n`.trim());const i=dq(".ops .watchlater");if(!i){return}const a=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((()=>{a.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"))}}})();