mirror of https://github.com/FreeTubeApp/FreeTube
[WIP] Video Options Menu and OPML Export Fix
This commit is contained in:
parent
1ac6ce7dce
commit
975d60cade
|
@ -84,7 +84,7 @@ function goToChannel(channelId) {
|
||||||
|
|
||||||
grabDuration.then((videoList) => {
|
grabDuration.then((videoList) => {
|
||||||
videoList.items.forEach((video) => {
|
videoList.items.forEach((video) => {
|
||||||
displayVideo(video, 'history');
|
displayVideo(video);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -200,7 +200,7 @@ let videoShortcutHandler = function(event) {
|
||||||
};
|
};
|
||||||
|
|
||||||
let fullscreenVideo = function(event){
|
let fullscreenVideo = function(event){
|
||||||
$('.videoPlayer').get(0).webkitRequestFullscreen()
|
$('.videoPlayer').get(0).webkitRequestFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -300,3 +300,13 @@ function removeMouseTimeout(){
|
||||||
$('.videoPlayer')[0].style.cursor = 'default';
|
$('.videoPlayer')[0].style.cursor = 'default';
|
||||||
clearTimeout(mouseTimeout);
|
clearTimeout(mouseTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showVideoOptions(element){
|
||||||
|
console.log(element.nextElementSibling.style.display);
|
||||||
|
if (element.nextElementSibling.style.display == 'none' || element.nextElementSibling.style.display == ''){
|
||||||
|
element.nextElementSibling.style.display = 'inline-block'
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
element.nextElementSibling.style.display = 'none'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -231,7 +231,7 @@ function setTheme(option) {
|
||||||
* @return {Void}
|
* @return {Void}
|
||||||
*/
|
*/
|
||||||
function importOpmlSubs(json){
|
function importOpmlSubs(json){
|
||||||
if(json[0]['folder'] !== 'YouTube Subscriptions'){
|
if(!json[0]['folder'].includes('YouTube')){
|
||||||
showToast('Invalid OPML File. Import is unsuccessful.');
|
showToast('Invalid OPML File. Import is unsuccessful.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,35 @@ iframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.videoOptions {
|
||||||
|
float: right;
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoOptions i {
|
||||||
|
text-align: right;
|
||||||
|
width: 50px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoOptions ul {
|
||||||
|
width: 75px;
|
||||||
|
font-size: 12px;
|
||||||
|
position: relative;
|
||||||
|
right: 75px;
|
||||||
|
bottom: 10px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
list-style-type: none;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoOptions li {
|
||||||
|
width: 125px;
|
||||||
|
position: relative;
|
||||||
|
right: 40px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.videoTitle {
|
.videoTitle {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-left: 285px;
|
margin-left: 285px;
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
<div class='video'>
|
<div class='video'>
|
||||||
{{{deleteHtml}}}
|
{{{deleteHtml}}}
|
||||||
|
<div class='videoOptions'>
|
||||||
|
<i class="fas fa-ellipsis-v" onclick='showVideoOptions(this)'></i>
|
||||||
|
<ul>
|
||||||
|
<li>Open in YouTube</li>
|
||||||
|
<li>Open in HookTube</li>
|
||||||
|
<li>Save Video</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<div class='videoThumbnail'>
|
<div class='videoThumbnail'>
|
||||||
<img onclick='playVideo("{{videoId}}")' src={{videoThumbnail}} />
|
<img onclick='playVideo("{{videoId}}")' src={{videoThumbnail}} />
|
||||||
<p onclick='playVideo("{{videoId}}")' class='videoDuration'>{{videoDuration}}</p>
|
<p onclick='playVideo("{{videoId}}")' class='videoDuration'>{{videoDuration}}</p>
|
||||||
|
|
Loading…
Reference in New Issue