(()=>{return(t,i)=>{(async()=>{if(!document.URL.includes("//www.bilibili.com/video/av")){return}await SpinQuery.condition(()=>dq(".video-toolbar .ops .collect"),t=>{return t!==null&&t.innerText!=="--"});const t=dq(".video-toolbar .ops .collect");if(!t){return}t.insertAdjacentHTML("afterend",`\n\n\n 稍后再看\n
{{tipText}}
\n
\n`);const i=dq(".ops .watchlater");const e=dq(".ops .watchlater .tip");if(!i||!e){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})})()}})();