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);
|
shell.openExternal(el.href);
|
||||||
}
|
}
|
||||||
else{
|
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;
|
let el = event.currentTarget;
|
||||||
if (!el.href.includes('freetube')) {
|
if (!el.href.includes('freetube')) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
shell.openExternal(el.href);
|
|
||||||
}
|
}
|
||||||
else{
|
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) => {
|
data.forEach((video) => {
|
||||||
switch (video.type) {
|
switch (video.type) {
|
||||||
case 'video':
|
case 'video':
|
||||||
displayVideo(video, 'search');
|
if (!video.paid) {
|
||||||
|
displayVideo(video, 'search');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'channel':
|
case 'channel':
|
||||||
displayChannel(video);
|
displayChannel(video);
|
||||||
break;
|
break;
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
displayPlaylist(video);
|
if (video.videoCount > 0) {
|
||||||
|
displayPlaylist(video);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue