diff --git a/src/js/channels.js b/src/js/channels.js index 4f37714fc..b4e88ec05 100644 --- a/src/js/channels.js +++ b/src/js/channels.js @@ -84,7 +84,7 @@ function goToChannel(channelId) { grabDuration.then((videoList) => { videoList.items.forEach((video) => { - displayVideo(video, 'history'); + displayVideo(video); }); }); }); diff --git a/src/js/events.js b/src/js/events.js index 63a856404..96672a638 100644 --- a/src/js/events.js +++ b/src/js/events.js @@ -200,7 +200,7 @@ let videoShortcutHandler = function(event) { }; let fullscreenVideo = function(event){ - $('.videoPlayer').get(0).webkitRequestFullscreen() + $('.videoPlayer').get(0).webkitRequestFullscreen(); } /** diff --git a/src/js/layout.js b/src/js/layout.js index 6b59f9d69..724c03c28 100644 --- a/src/js/layout.js +++ b/src/js/layout.js @@ -300,3 +300,13 @@ function removeMouseTimeout(){ $('.videoPlayer')[0].style.cursor = 'default'; 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' + } +} diff --git a/src/js/settings.js b/src/js/settings.js index 8ef3f9bfa..8f2ff126a 100644 --- a/src/js/settings.js +++ b/src/js/settings.js @@ -231,7 +231,7 @@ function setTheme(option) { * @return {Void} */ function importOpmlSubs(json){ - if(json[0]['folder'] !== 'YouTube Subscriptions'){ + if(!json[0]['folder'].includes('YouTube')){ showToast('Invalid OPML File. Import is unsuccessful.'); return; } diff --git a/src/style/player.css b/src/style/player.css index f877c88ac..adc967537 100644 --- a/src/style/player.css +++ b/src/style/player.css @@ -27,6 +27,35 @@ iframe { 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 { font-weight: bold; margin-left: 285px; diff --git a/src/templates/videoList.html b/src/templates/videoList.html index 8a4fffeb4..06ec3656c 100644 --- a/src/templates/videoList.html +++ b/src/templates/videoList.html @@ -1,5 +1,13 @@
{{{deleteHtml}}} +
+ + +

{{videoDuration}}