mirror of https://github.com/FreeTubeApp/FreeTube
Hide videos if behind paywall
This commit is contained in:
parent
11ba9f14fe
commit
a78afd1b46
|
@ -256,7 +256,7 @@ $(document).on('click', 'a[href^="http"]', (event) => {
|
|||
shell.openExternal(el.href);
|
||||
}
|
||||
else{
|
||||
window.open(el.href,"_self")
|
||||
window.open(el.href,"_self");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -265,9 +265,10 @@ $(document).on('auxclick', 'a[href^="http"]', (event) => {
|
|||
let el = event.currentTarget;
|
||||
if (!el.href.includes('freetube')) {
|
||||
event.preventDefault();
|
||||
shell.openExternal(el.href);
|
||||
}
|
||||
else{
|
||||
window.open(el.href,"_self")
|
||||
event.preventDefault();
|
||||
let url = el.href.replace('freetube://', '');
|
||||
shell.openExternal(el.href);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -55,13 +55,17 @@ function search(page = 1) {
|
|||
data.forEach((video) => {
|
||||
switch (video.type) {
|
||||
case 'video':
|
||||
displayVideo(video, 'search');
|
||||
if (!video.paid) {
|
||||
displayVideo(video, 'search');
|
||||
}
|
||||
break;
|
||||
case 'channel':
|
||||
displayChannel(video);
|
||||
break;
|
||||
case 'playlist':
|
||||
displayPlaylist(video);
|
||||
if (video.videoCount > 0) {
|
||||
displayPlaylist(video);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue