Description
youtube video while started downloading its get error Address Expired
Extention Error:
Uncaught Error: Extension context invalidated.
Context
https://www.youtube.com/watch?v=ZNnt25okdMU
Stack Trace
content/content_video_bar.js:2 (anonymous function)
1
2
"use strict";var video_bar={bars:{},mapped:{},mapped_m3u8_str:{},values:{},audios:{},refreshing_address:{},temp_m3u8_content:{},potential_urls:{},potential_url_hosts:{},potential_keys:{},refresh_address_bar:null,displayed:!0,title:"",og_title:"",page_url:"",video_id:0,bind_element_events:function(e){let t=this;e.dom.addEventListener("haschange",function(){}),e.dom.addEventListener("DOMNodeRemoved",function(){e.removing_timer=setTimeout(function(){e.entered||t.remove(e)},1)})},bind_m3u8_element:function(t,i){if(t){let e=t[config.video_id_name];e=e||video_bar.create(t),video_bar.create_m3u8_item(e,i),video_bar.update_offset(e)}},bind_bar_events:function(i,e){let t=this,r=i.bar,n=i.bar_items,s=0;r.addEventListener("click",function(e){i.dragging||(i.items_visible?n.style.display="none":n.style.display="block",t.update_property_size(i),i.dom.parentNode&&t.update_offset(i,!0),i.left+i.width>s&&(i.bar.style.left=(i.left=s-i.width)+"px"),i.items_visible=!i.items_visible)}),r.addEventListener("mousedown",function(e){t.update_property_size(i),s=document.body.scrollWidth,i.extra_left=e.pageX-i.left,i.extra_top=e.pageY-i.top,i.pressed=!0,e.stopPropagation(),e.preventDefault()}),r.addEventListener("mouseenter",function(e){i.entered=!0}),r.addEventListener("mouseleave",function(e){i.entered=!1,-1!==i.removing_timer&&(clearTimeout(i.removing_timer),t.remove(i))}),e.addEventListener("click",function(e){i.dragging||(i.bar.style.display="none",i.bar.style.zIndex="-1")}),document.addEventListener("mouseup",function(e){i.pressed&&(i.pressed=!1,i.dragging&&setTimeout(()=>i.dragging=!1,0),e.stopPropagation(),e.preventDefault())}),document.addEventListener("mousemove",function(e){var t;i.pressed&&(t=e.pageX-i.extra_left,e=e.pageY-i.extra_top,t+i.widt
6ED3
h<=s?i.left=Math.max(0,t):i.left=s-i.width,i.top=Math.max(0,e),r.style.left=i.left+"px",r.style.top=i.top+"px",i.moved=!0,i.dragging=!0)})},name_from_title:function(){return this.og_title||this.title||document.title},update_property_size:function(e){e.width=e.bar.offsetWidth,e.height=e.bar_btn.offsetHeight},update_badge_text:function(){},update_offset:function(e,t){for(var i=0,r=0;r<e.items.length;++r)!1===e.items[r].hidden&&i++;if(e.bar_text.innerText=i+" "+lang("files"),!e.entered||t){var t="none"!==e.dom.style.display;if(!t&&e.visible)return e.visible=!1,void(e.bar.style.display="none");t&&!e.visible&&(e.visible=!0,e.bar.style.display=""),e.moved||(this.update_property_size(e),t=element_offset(e.dom),e.left=Math.max(t.left+e.dom.offsetWidth-e.width,0),e.top=Math.max(t.top-e.height,0),e.left+e.width>document.body.scrollWidth&&(e.left=document.body.scrollWidth-e.width),e.bar.style.left=e.left+"px",e.bar.style.top=e.top+"px")}},sort_items:function(t){t.items.sort((e,t)=>{if("MP4A"===e.type&&"MP4A"!==t.type)return-1;if(e.type.length>t.type.length)return 1;if(e.type.length<t.type.length)return-1;let i=e.text.split(" "),r=t.text.split(" ");if(i.length!==r.length)return i.length<r.length?1:-1;for(let e=0;e<i.length;++e){var n=i[e].indexOf("x")||i[e].indexOf(""),s=r[e].indexOf("x")||r[e].indexOf("");if(-1!==n&&-1!==s){n=i[e].substr(0,n),s=r[e].substr(0,s);if(is_numeric(n)&&is_numeric(s))return parseInt(n)<parseInt(s)?1:-1}}return e.text<t.text?1:-1}).forEach(e=>t.bar_items.appendChild(e.btn))},emplace_audio:function(e){e.size||(e.size=0),this.audios[e.url]={type:e.media_type,resid:e.size,text:bytes_to_str(e.size),file_name:this.name_from_title()+"."+e.media_type.toLowerCase(),referer:e.referer,header:e.header}},convert_item_text:function(e){let t="";return e.text&&0<e.text.length?t=e.text:e.size&&(t=bytes_to_str(e.size)),t},create_refresh_address_bar:function(e){var e=lang("refresh_address_msg_content")+" "+e+"",t=lang("recapture_address");let i=this.refresh_address_bar=Std.ui("Notify").information(e,t,{direction:"south",css:{opacity:.6}});i.closable(!1)},create_item_element:function(e,t,i,r,n,s){let a=this,o=r.url;"string"==typeof s&&(o=new URL(s,r.url).href);let d,=t+" "+(i=i.trim()),l={type:t,url:o,text:i,audio:r.audio_type,stream:n,resid:,referer:r.referer,cookie:r.cookie,header:r.header},m=(r.source&&(d=r.source.hashCode(),l.source=r.source),d=d||o.hashCode(),(n||0!==e.dom.currentSrc.length&&"blob:"===e.dom.currentSrc.substr(0,5)||1===document.getElementsByTagName("video").length)&&(l.file_name=a.name_from_title()),"file_name"in l&&0!==l.file_name.length&&!n&&(l.file_name+="."+t.toLowerCase()),document.createElement("div"));return m.className=config.class_prefix+"video_bar_item",m.innerHTML=""+t+" "+i,m.addEventListener("click",function(e){let t={resid:,page_url:a.page_url,potential_urls:object_values_to_array(video_bar.potential_url_hosts,30),potential_keys:object_keys_to_array(video_bar.potential_keys,10)};for(var i in a.refreshing_address){var r=a.refreshing_address[i];if(r.resid===){t["@"]="task_edit",t.id=Number(i),t.type=parseInt(r.typeid),t["~"]="1",chrome.runtime.sendMessage({type:"recapture_address_msg_success"});break}}function n(){chrome.runtime.sendMessage({type:"download_request",uri:create_filec_uri(o,l,l.referer||window.location.href,navigator.userAgent,l.cookie,t,l.header,l.source)})}o&&!l.cookie?chrome.runtime.sendMessage({type:"get_url_cookies",url:o},function(e){l.cookie=e,n()}):n()}),!0===r.audio_type&&(m.className+=" "+config.class_prefix+"video_bar_item_audio"),e.items.push({type:t,text:i,btn:m,attr:r,page_url:window.location.href,hidden:!1}),e.bar_items.appendChild(m),a.sort_items(e),a.values[i+d]=l,m},create_m3u8_subitem:function(e,t,i){var r=t.attr;let n="";r.BANDWIDTH&&(n+=bytes_to_str(parseInt(r.BANDWIDTH))+"/s"),r.RESOLUTION&&(n+=" "+r.RESOLUTION),r["FRAME-RATE"]&&(n+=" "+parseInt(r["FRAME-RATE"])+"fps"),i.is_subversion=!0,this.create_item_element(e,"TS",n,i,"m3u8",t.address)},create_m3u8_item:function(t,i){let r=0;for(let e=0;e<i.segments.length;++e){var n=i.segments[e];"Segment"!==n.type?this.create_m3u8_subitem(t,n,i):(n=n.attr[""],is_numeric(n)&&(r+=parseFloat(n)))}if(i.segments=null,0!==r){let e=t.items[t.items.length-1];e&&!e.attr.is_subversion&&"m3u8"===e.attr.media_type?e.attr=i:this.create_item_element(t,"TS",duration_to_str(r)+" "+lang("minutes"),i,"m3u8")}!i.url||i.url in video_bar.mapped||(video_bar.mapped[i.url]=t)},create_xxx_item:function(e,t){this.create_item_element(e,t.media_type.toUpperCase(),this.convert_item_text(t),t)},create_item:function(r,n){let s=this.convert_item_text(n),a=n.media_type.toUpperCase(),o=this.create_item_element(r,a,s,n),d=this;r.dom.addEventListener("loadedmetadata",function(){var e=this.videoWidth,t=this.videoHeight;let i=""+a+" "+s;0===e||0===t||n.no_auto_size||(i+=" "+e+"x"+t),o.innerHTML=i,r.dragging||d.update_offset(r)})},create_property:function(e,t,i,r,n,s){return{id:e,dom:t,bar:i,bar_btn:r,bar_text:n,bar_items:s,default_src:t.src,holding:!0,visible:!0,items_visible:!1,pressed:!1,left:0,top:0,width:0,height:0,extra_left:0,extra_top:0,entered:!1,dragging:!1,moved:!1,removing_timer:-1,items:[],hidden:0,cached_segments:[]}},create:function(e){var t=++video_bar.video_id;let i=create_element("div",config.class_prefix+"video_bar"),r=create_element("div",config.class_prefix+"video_bar_btn");var n=create_element("div",config.class_prefix+"video_bar_btn_icon"),s=create_element("div",config.class_prefix+"video_bar_btn_text"),a=create_element("div",config.class_prefix+"video_bar_btn_close");let o=create_element("div");var d=create_element("div",config.class_prefix+"video_bar_items"),=this.create_property(t,e,i,r,s,d);return this.bind_element_events(),this.bind_bar_events(,a),o.style.clear="both",r.appendChild(n),r.appendChild(s),r.appendChild(a),r.appendChild(o),i.appendChild(r),i.appendChild(d),this.displayed||(i.style.zIndex=-1,i.style.visibility="hidden"),document.body.appendChild(i),this.bars[t]=e[config.video_id_name]=},remove:function(e){e.items_visible=!1,e.moved=!1,e.removing_timer=-1,e.bar_items.style.display="none",e.bar.parentNode===document.body&&document.body.removeChild(e.bar),delete e.dom[config.video_id_name],delete this.bars[e.id]},display:function(t){for(var i in this.bars){let e=this.bars[i];t?(e.bar.style.removeProperty("z-index"),e.bar.style.removeProperty("visibility")):(e.bar.style.zIndex=-1,e.bar.style.visibility="hidden")}this.displayed=t},update:function(){let i=this;if(video_bar.update_badge_text(),i.displayed){for(var e in i.bars)i.bars[e].dom.parentNode&&i.update_offset(i.bars[e]);document.querySelectorAll("video").forEach(function(t){if(!t[config.video_id_name]&&"none"!==t.style.display&&t.currentSrc){let e=i.mapped[t.currentSrc];e&&(e.dom=t,e.dom[config.video_id_name]=e,document.body.appendChild(e.bar),i.bars[e.id]=e,i.bind_element_events(e),i.update_offset(e))}})}},url_change:function(e){}};
Listener added for a 'DOMNodeRemoved' mutation event. Support for this event type has been removed, and this event will no longer be fired. See https://chromestatus.com/feature/5083947249172480 for more information.