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