aboutsummaryrefslogtreecommitdiffstats
path: root/scripts-greasemonkey
diff options
context:
space:
mode:
Diffstat (limited to 'scripts-greasemonkey')
-rw-r--r--scripts-greasemonkey/youtube_to_invidious.user.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts-greasemonkey/youtube_to_invidious.user.js b/scripts-greasemonkey/youtube_to_invidious.user.js
index 06d5f38..a5893a9 100644
--- a/scripts-greasemonkey/youtube_to_invidious.user.js
+++ b/scripts-greasemonkey/youtube_to_invidious.user.js
@@ -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'));