[Invidious Redirect] fix syntax
This commit is contained in:
parent
c459c65a4d
commit
80dc73c4d0
@ -87,7 +87,9 @@ function addbtn(){
|
||||
let btn=document.createElement('a');
|
||||
btn.innerHTML='<h2>Watch on '+instance+'</h2>';
|
||||
btn.href='javascript:void(0)';
|
||||
btn.onclick=function(){redir();};
|
||||
btn.onclick=function(){
|
||||
redir();
|
||||
}
|
||||
btn.className='skipinv';
|
||||
title[i].parentNode.appendChild(btn);
|
||||
}
|
||||
@ -96,8 +98,12 @@ function addbtn(){
|
||||
if(current){
|
||||
thumbs=Array.prototype.slice.call(document.getElementsByTagName('img')).filter(ytel);
|
||||
if(b==1)links=Array.prototype.slice.call(document.getElementsByTagName('a')).filter(ythref);
|
||||
if(thumbs.length>0)thumb();
|
||||
if(links.length>0)link();
|
||||
if(thumbs.length>0){
|
||||
thumb();
|
||||
}
|
||||
if(links.length>0){
|
||||
link();
|
||||
}
|
||||
statuscheck();
|
||||
}else{
|
||||
let title=Array.prototype.slice.call(document.getElementsByTagName('h1'));
|
||||
@ -113,7 +119,9 @@ let observer=new MutationObserver(function(mutations){
|
||||
}
|
||||
if(b==1){
|
||||
links=Array.prototype.slice.call(mutation.target.getElementsByTagName('a')).filter(ythref);
|
||||
if(links.length>0)link();
|
||||
if(links.length>0){
|
||||
link();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
skip=Array.prototype.slice.call(mutation.target.getElementsByClassName('skipinv'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user