aboutsummaryrefslogtreecommitdiffstats
path: root/scripts-greasemonkey
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2020-01-01 13:49:39 -0500
committerJesús <heckyel@hyperbola.info>2020-01-01 13:49:39 -0500
commit80dc73c4d0acca9c674c0e346175f3ebce2174ee (patch)
treef3d26327e1e033f0e52bbc2d0f0b428d0bd278e4 /scripts-greasemonkey
parentc459c65a4d5382923230533cba89ff7ff98b9e79 (diff)
downloadbook-80dc73c4d0acca9c674c0e346175f3ebce2174ee.tar.lz
book-80dc73c4d0acca9c674c0e346175f3ebce2174ee.tar.xz
book-80dc73c4d0acca9c674c0e346175f3ebce2174ee.zip
[Invidious Redirect] fix syntax
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'));