From 0bc821245347fa29dc035330f55574280de06a4b Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Fri, 7 Apr 2023 20:51:27 +0200 Subject: [PATCH 1/3] cosmetics & #1544 --- .../appearance/details/details.css | 134 +++++------------- js&css/web-accessible/core.js | 3 +- js&css/web-accessible/functions.js | 32 +++-- .../www.youtube.com/appearance.js | 37 +---- .../web-accessible/www.youtube.com/player.js | 11 +- menu/styles/appearance.css | 22 +-- 6 files changed, 77 insertions(+), 162 deletions(-) diff --git a/js&css/extension/www.youtube.com/appearance/details/details.css b/js&css/extension/www.youtube.com/appearance/details/details.css index af75b844c..91c8d6eda 100644 --- a/js&css/extension/www.youtube.com/appearance/details/details.css +++ b/js&css/extension/www.youtube.com/appearance/details/details.css @@ -2,56 +2,45 @@ >>> DETAILS ---------------------------------------------------------------- /*-------------------------------------------------------------- -# General +General --------------------------------------------------------------*/ #info #info-text { max-height: 6rem; display: block; } - /*-------------------------------------------------------------- -# HIDE DETAILS +HIDE DETAILS --------------------------------------------------------------*/ - html[it-hide-details='true'] ytd-video-primary-info-renderer, html[it-hide-details='true'] ytd-video-secondary-info-renderer, html[it-hide-details='true'] ytd-watch-metadata { display: none !important; } - - /*-------------------------------------------------------------- -# HIDE VIEWS COUNT +HIDE VIEWS COUNT --------------------------------------------------------------*/ - html[it-hide-views-count='true'] #info #count, html[it-hide-views-count='true'] #info #count + #info-strings>#dot, html[it-hide-views-count='true'] ytd-watch-metadata #info>span:first-child { display: none !important; } - /*-------------------------------------------------------------- -# HIDE COMMENTS COUNT +HIDE COMMENTS COUNT --------------------------------------------------------------*/ - html[it-hide-comments-count='true'] #comments #count { display: none !important; } - /*-------------------------------------------------------------- -# HIDE DATE +HIDE DATE --------------------------------------------------------------*/ - html[it-hide-date='true'] #info #count + #info-strings>yt-formatted-string, html[it-hide-date='true'] #info #count + #info-strings>#dot, html[it-hide-date='true'] ytd-watch-metadata #info>span:last-child { display: none !important; } - - /*-------------------------------------------------------------- +/*-------------------------------------------------------------- YouTube's detail buttons --------------------------------------------------------------*/ - html[it-youtubeDetailButtons='remove_labels'] #menu ytd-button-renderer div:nth-child(2), html[it-youtubeDetailButtons='remove_labels'] #menu ytd-button-renderer .cbox, html[it-youtubeDetailButtons='remove_labels'] #subscribe-button .cbox, @@ -65,19 +54,15 @@ html[it-youtubeDetailButtons='half_transparent'] #menu button {opacity:0.5;} html[it-youtubeDetailButtons='transparent_background'] #subscribe-button button, html[it-youtubeDetailButtons='transparent_background'] #menu button {background-color:rgba(0, 0, 0, 0.01) !important;} html[it-youtubeDetailButtons='transparent_background'] #subscribe-button button {color:#111 !important;} - - /*-------------------------------------------------------------- + /*-------------------------------------------------------------- HIDE SUBSCRIBE --------------------------------------------------------------*/ html[it-subscribe='hidden'] #subscribe-button {display: none !important;} html[it-subscribe='grey'] #subscribe-button button { background-color: #DDD !important; color:#111 !important; } html[it-subscribe='transparent'] #subscribe-button button {background-color:rgba(0, 0, 0, 0) !important; color:#111 !important; } - - - /*-------------------------------------------------------------- +/*-------------------------------------------------------------- HIDE LIKE BUTTON --------------------------------------------------------------*/ - html[it-likes='hidden'] #top-level-buttons-computed #segmented-like-button ytd-toggle-button-renderer, html[it-likes='icons_only'] #top-level-buttons-computed #segmented-like-button ytd-toggle-button-renderer div.cbox { display: none; @@ -88,71 +73,60 @@ html[it-likes='icons_only'] #top-level-buttons-computed #segmented-like-button y margin: 0; padding: 0 5px; } - - /*-------------------------------------------------------------- HIDE DISLIKE BUTTON --------------------------------------------------------------*/ - html[it-hide-dislike-button='hidden'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer, html[it-hide-dislike-button='icons_only'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer div.cbox { display: none; } - html[it-hide-dislike-button='icons_only'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer .yt-spec-button-shape-next__icon, html[it-hide-dislike-button='icons_only'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer button{ margin: 0; padding: 0 5px; } - - /*-------------------------------------------------------------- -# HIDE SHARE BUTTON +DISLIKED in RED +--------------------------------------------------------------*/ +html[it-red-dislike-button='true'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer *[aria-pressed='true'] yt-icon { + color: #f02200 !important; +} +/*-------------------------------------------------------------- +HIDE SHARE BUTTON --------------------------------------------------------------*/ - html[it-hide-share-button='hidden'] #menu button:has(svg path[d^="M15,5.63L20.66,12L15,18.37V15v"]), html[it-hide-share-button='hidden'] #flexible-item-buttons button:has(svg path[d^="M15,5.63L20.66,12L15,18.37V15v"]) { display: none; } - html[it-hide-share-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M15,5.63L20.66,12L15,18.37V15v"]) div:nth-child(2), html[it-hide-share-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M15,5.63L20.66,12L15,18.37V15v"]) .cbox{ display: none; } - - /*-------------------------------------------------------------- -# HIDE DOWNLOAD BUTTON +HIDE DOWNLOAD BUTTON --------------------------------------------------------------*/ - html[it-hide-download-button='hidden'] #menu button:has(svg path[d^="M17 18V19H6V18H17ZM16.5 11.4"]), html[it-hide-download-button='hidden'] #flexible-item-buttons button:has(svg path[d^="M17 18V19H6V18H17ZM16.5 11.4"]) { display: none; } - html[it-hide-download-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M17 18V19H6V18H17ZM16.5 11.4"]) div:nth-child(2), html[it-hide-download-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M17 18V19H6V18H17ZM16.5 11.4"]) .cbox{ display: none; } - /*-------------------------------------------------------------- -# HIDE THANKS BUTTON +HIDE THANKS BUTTON --------------------------------------------------------------*/ - html[it-hide-thanks-button='hidden'] #menu button:has(svg path[d^="M16.5,3C19.02,3,21,5.19,21,7.99c"]), html[it-hide-thanks-button='hidden'] #flexible-item-buttons button:has(svg path[d^="M16.5,3C19.02,3,21,5.19,21,7.99c"]) { display: none; } - html[it-hide-thanks-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M16.5,3C19.02,3,21,5.19,21,7.99c"]) div:nth-child(2), html[it-hide-thanks-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M16.5,3C19.02,3,21,5.19,21,7.99c"]) .cbox{ display: none; } - /*-------------------------------------------------------------- -# HIDE CLIP BUTTON +HIDE CLIP BUTTON --------------------------------------------------------------*/ - html[it-hide-clip-button='hidden'] #menu button:has(svg path[d^="M8,7c0,0.55-0.45,1-1,1S6,7."]), html[it-hide-clip-button='hidden'] #flexible-item-buttons button:has(svg path[d^="M8,7c0,0.55-0.45,1-1,1S6,7."]) { display: none; @@ -162,74 +136,61 @@ html[it-hide-clip-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^ html[it-hide-clip-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M8,7c0,0.55-0.45,1-1,1S6,7."]) .cbox{ display: none; } - - /*-------------------------------------------------------------- -# HIDE SAVE BUTTON +HIDE SAVE BUTTON --------------------------------------------------------------*/ - html[it-hide-save-button='hidden'] #menu button:has(svg path[d^="M22,13h-4v4h-2v-4h-4v-2h4V7h2v4h4V13z"]), html[it-hide-save-button='hidden'] #flexible-item-buttons button:has(svg path[d^="M22,13h-4v4h-2v-4h-4v-2h4V7h2v4h4V13z"]) { display: none; } - html[it-hide-save-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M22,13h-4v4h-2v-4h-4v-2h4V7h2v4h4V13z"]) div:nth-child(2), html[it-hide-save-button='icons_only'] #menu ytd-button-renderer:has(svg path[d^="M22,13h-4v4h-2v-4h-4v-2h4V7h2v4h4V13z"]) .cbox{ display: none; } - - /*-------------------------------------------------------------- -# HIDE REPORT BUTTON +HIDE REPORT BUTTON --------------------------------------------------------------*/ - -html[it-hide-report-button='true'] #menu button:has(svg path[d^="M7.5,12c0,0.83-0.67,1.5-1.5"]), -html[it-hide-report-button='true'] #flexible-item-buttons button:has(svg path[d^="M7.5,12c0,0.83-0.67,1.5-1.5"]) { +html[it-hide-report-button='true'] #menu button:has(svg path[d^="M13.18,4l0.24,1.2L13.58,"]), +html[it-hide-report-button='true'] #flexible-item-buttons button:has(svg path[d^="M13.18,4l0.24,1.2L13.58,"]) { display: none; } - - /*-------------------------------------------------------------- -# HIDE MORE BUTTON +HIDE MORE BUTTON --------------------------------------------------------------*/ - -html[it-hide-more-button='true'] #menu button:has(svg path[d^="M22,13h-4v4h-2v-4h-4v-2h4V7h2v4h4V13z"]), -html[it-hide-more-button='true'] #flexible-item-buttons button:has(svg path[d^="M22,13h-4v4h-2v-4h-4v-2h4V7h2v4h4V13z"]) { +html[it-hide-more-button='true'] #menu button:has(svg path[d^="M7.5,12c0,0.83-0.67,1.5-1.5"]), +html[it-hide-more-button='true'] #flexible-item-buttons button:has(svg path[d^="M7.5,12c0,0.83-0.67,1.5-1.5"]) { display: none; } - /*-------------------------------------------------------------- -# HIDE THANKS BUTTON +HIDE THANKS BUTTON --------------------------------------------------------------*/ - html[it-hide-thanks-button='hidden'] #flexible-item-buttons ytd-button-renderer#Thanks-button, html[it-hide-thanks-button='icons_only'] #flexible-item-buttons ytd-button-renderer#Thanks-button div.cbox { display: none; } - /*-------------------------------------------------------------- -# HIDE CLIP BUTTON +HIDE CLIP BUTTON --------------------------------------------------------------*/ - html[it-hide-clip-button='hidden'] #flexible-item-buttons ytd-button-renderer#Clip-button, html[it-hide-clip-button='icons_only'] #flexible-item-buttons ytd-button-renderer#Clip-button div.cbox { display: none; } - /*-------------------------------------------------------------- -# HIDE SAVE BUTTON +HIDE SAVE BUTTON --------------------------------------------------------------*/ - html[it-hide-save-button='hidden'] #flexible-item-buttons ytd-button-renderer#Save-button, html[it-hide-save-button='icons_only'] #flexible-item-buttons ytd-button-renderer#Save-button div.cbox { display: none; } - - /*-------------------------------------------------------------- -# DESCRIPTION +DESCRIPTION --------------------------------------------------------------*/ - +html[it-description='hidden'] ytd-video-secondary-info-renderer ytd-expander.ytd-video-secondary-info-renderer, +html[it-description='hidden'] div#action-panel-details, +html[it-description='hidden'] ytd-expander.ytd-video-secondary-info-renderer, +html[it-description='hidden'] #description-inline-expander { + display: none !important; +} html[it-description='classic'] .ytd-watch-flexy #info-contents, html[it-description='classic'] .ytd-watch-flexy #meta-contents { display: block !important; } html[it-description='classic'] #below.ytd-watch-flexy { top:-20px; } @@ -247,23 +208,13 @@ html[it-description='classic_hidden'] #below.ytd-watch-flexy { top:-20px; } html[it-description='classic_hidden'] ytd-menu-renderer[has-flexible-items] { overflow-y: unset !important; } html[it-description='classic_hidden'] ytd-video-primary-info-renderer { padding-bottom: 14px !important; } -html[it-description='hidden'] ytd-video-secondary-info-renderer ytd-expander.ytd-video-secondary-info-renderer, -html[it-description='hidden'] div#action-panel-details, -html[it-description='hidden'] ytd-expander.ytd-video-secondary-info-renderer, -html[it-description='hidden'] #description-inline-expander { - display: none !important; -} html[it-description='classic'] div.style-scope.ytd-watch-flexy + ytd-watch-metadata, html[it-description='classic_expanded'] div.style-scope.ytd-watch-flexy + ytd-watch-metadata, html[it-description='classic_hidden'] div.style-scope.ytd-watch-flexy + ytd-watch-metadata {display: none !important;} - - - /*-------------------------------------------------------------- -# HOW LONG AGO THE VIDEO WAS UPLOADED +HOW LONG AGO THE VIDEO WAS UPLOADED --------------------------------------------------------------*/ - .it-how-long-ago-the-video-was-uploaded { float: right !important; @@ -271,24 +222,13 @@ html[it-description='classic_hidden'] div.style-scope.ytd-watch-flexy + ytd-watc color: var(--yt-spec-text-secondary) !important; } - /*-------------------------------------------------------------- -# SHOW CHANNEL VIDEOS COUNT +SHOW CHANNEL VIDEOS COUNT --------------------------------------------------------------*/ - .it-channel-videos-count { display: inline-block !important; margin-left: 4px !important; color: var(--yt-spec-text-secondary) !important; -} - - -/*-------------------------------------------------------------- -# SHOW DISLIKE RED COLOR ---------------------------------------------------------------*/ - -html[it-red-dislike-button='true'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer *[aria-pressed='true'] yt-icon { - color: #f02200 !important; } \ No newline at end of file diff --git a/js&css/web-accessible/core.js b/js&css/web-accessible/core.js index a152069f9..109691bc4 100644 --- a/js&css/web-accessible/core.js +++ b/js&css/web-accessible/core.js @@ -138,10 +138,11 @@ document.addEventListener('it-message-from-extension', function () { ImprovedTube.myColors(); ImprovedTube.setTheme(); } else if (camelized_key === 'description') { - if (ImprovedTube.storage.description === "expanded" || ImprovedTube.storage.description === "classic_expanded" ) + if (ImprovedTube.storage.description === "expanded" || ImprovedTube.storage.description === "classic_expanded" ) {try{document.querySelector("#more").click() || document.querySelector("#expand").click() ;} catch{} } if (ImprovedTube.storage.description === "normal" || ImprovedTube.storage.description === "classic" ) {try{document.querySelector("#less").click() || document.querySelector("#collapse").click();} catch{}} + ImprovedTube.improvedtubeYoutubeButtonsUnderPlayer(); } else if (camelized_key === 'transcript') { if (ImprovedTube.storage.transcript === true) {try{document.querySelector('*[target-id*=transcript]').removeAttribute('visibility');}catch{} diff --git a/js&css/web-accessible/functions.js b/js&css/web-accessible/functions.js index 1db4426fe..e10f27361 100644 --- a/js&css/web-accessible/functions.js +++ b/js&css/web-accessible/functions.js @@ -59,17 +59,33 @@ ImprovedTube.ytElementsHandler = function (node) { var index = Array.prototype.indexOf.call(node.parentNode.children, node); if (index === 0) { - this.elements.playlist.actions = node.parentNode.parentNode.parentNode.parentNode; - - this.playlistReverse(); + if (this.storage.playlist_reverse === true) { + try{this.elements.playlist.actions = node.parentNode.parentNode.parentNode.parentNode;} + catch{try{this.elements.playlist.actions = node.parentNode.parentNode.parentNode;} + catch{try{this.elements.playlist.actions = node.parentNode.parentNode;} + catch{try{this.elements.playlist.actions = node.parentNode;} + catch{try{this.elements.playlist.actions = node;}catch{}} + } + } + } + } + this.playlistReversess(); } else if (index === 1) { this.elements.playlist.shuffle_button = node; this.playlistShuffle(); - this.elements.playlist.actions = node.parentNode.parentNode.parentNode.parentNode; - - this.playlistReverse(); + if (this.storage.playlist_reverse === true) { + try{this.elements.playlist.actions = node.parentNode.parentNode.parentNode.parentNode;} + catch{try{this.elements.playlist.actions = node.parentNode.parentNode.parentNode;} + catch{try{this.elements.playlist.actions = node.parentNode.parentNode;} + catch{try{this.elements.playlist.actions = node.parentNode;} + catch{try{this.elements.playlist.actions = node;}catch{}} + } + } + } + } + this.playlistReversess(); } } } else if (name === 'YTD-GUIDE-SECTION-RENDERER') { @@ -215,9 +231,9 @@ ImprovedTube.ytElementsHandler = function (node) { }else if (document.documentElement.dataset.pageType === 'video'){ if (id ==='description-inner') { setTimeout(function () { - ImprovedTube.descriptionLayout(node); + ImprovedTube.expandDescription(node); }, 300); - }else if (id === 'meta') {setTimeout(function () { ImprovedTube.descriptionLayout(node.querySelector('#more')); }, 200); + }else if (id === 'meta') {setTimeout(function () { ImprovedTube.expandDescription(node.querySelector('#more')); }, 200); }else if (id === 'below' ){setTimeout(function () { }, 0); }else if (id === 'panels'){setTimeout(function () { ImprovedTube.transcript(node); diff --git a/js&css/web-accessible/www.youtube.com/appearance.js b/js&css/web-accessible/www.youtube.com/appearance.js index 216688918..19e6eb43d 100644 --- a/js&css/web-accessible/www.youtube.com/appearance.js +++ b/js&css/web-accessible/www.youtube.com/appearance.js @@ -7,7 +7,6 @@ /*------------------------------------------------------------------------------ PLAYER SIZE ------------------------------------------------------------------------------*/ - ImprovedTube.playerSize = function () { if (this.storage.player_size === "custom") { var width = Number(this.storage.custom_player_size_width) || 1280, @@ -23,11 +22,9 @@ ImprovedTube.playerSize = function () { window.dispatchEvent(new Event('resize')); } }; - /*------------------------------------------------------------------------------ FORCED THEATER MODE ------------------------------------------------------------------------------*/ - ImprovedTube.forcedTheaterMode = function () { if (ImprovedTube.storage.forced_theater_mode === true && ImprovedTube.elements.ytd_watch && ImprovedTube.elements.player) { var button = ImprovedTube.elements.player.querySelector("button.ytp-size-button"); @@ -41,11 +38,9 @@ ImprovedTube.forcedTheaterMode = function () { } } }; - /*------------------------------------------------------------------------------ HD THUMBNAIL ------------------------------------------------------------------------------*/ - ImprovedTube.playerHdThumbnail = function () { if (this.storage.player_hd_thumbnail === true) { var thumbnail = ImprovedTube.elements.player_thumbnail; @@ -55,11 +50,9 @@ ImprovedTube.playerHdThumbnail = function () { } } }; - /*------------------------------------------------------------------------------ ALWAYS SHOW PROGRESS BAR ------------------------------------------------------------------------------*/ - ImprovedTube.alwaysShowProgressBar = function () { if (this.storage.always_show_progress_bar === true) { var player = ImprovedTube.elements.player; @@ -106,11 +99,9 @@ ImprovedTube.alwaysShowProgressBar = function () { } } }; - /*------------------------------------------------------------------------------ VIDEO REMAINING DURATION ------------------------------------------------------------------------------*/ - ImprovedTube.formatSecond = function (rTime) { var time = new Date(null); if (this.storage.duration_with_speed === true) { @@ -144,7 +135,6 @@ ImprovedTube.playerRemainingDuration = function () { element.remove(); } }; - /*------------------------------------------------------------------------------ Comments Sidebar ------------------------------------------------------------------------------*/ @@ -174,7 +164,6 @@ ImprovedTube.chapters = function (el){ if (ImprovedTube.storage.chapters === tru try{el.querySelector('*[target-id*=chapters]').removeAttribute('visibility');} catch{}} } - /*------------------------------------------------------------------------------ LIVECHAT ------------------------------------------------------------------------------*/ @@ -192,14 +181,12 @@ ImprovedTube.livechat = function () { } } }; - /*------------------------------------------------------------------------------ DETAILS ------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ PLAYER BUTTONS ------------------------------------------------------------------------------*/ - ImprovedTube.improvedtubeYoutubeButtonsUnderPlayer = function () { if (window.self !== window.top) { return false; @@ -207,7 +194,8 @@ ImprovedTube.improvedtubeYoutubeButtonsUnderPlayer = function () { if (document.documentElement.dataset.pageType === 'video') { var section = document.querySelector('#subscribe-button'); - if (this.storage.description == "classic" || this.storage.description == "classic_expanded" || this.storage.description !== "classic_hidden" ) + if (this.storage.description == "classic" + || this.storage.description == "classic_expanded" || this.storage.description == "classic_hidden" ) {var section = document.querySelector('#flex.ytd-video-primary-info-renderer');} if (section && !document.querySelector('.improvedtube-player-button')) { @@ -252,8 +240,8 @@ ImprovedTube.improvedtubeYoutubeButtonsUnderPlayer = function () { path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); button.className = 'improvedtube-player-button'; - button.dataset.tooltip = 'Picture in picture'; - + button.dataset.tooltip = 'PiP'; + svg.style.opacity = '.64'; svg.setAttributeNS(null, 'viewBox', '0 0 24 24'); path.setAttributeNS(null, 'd', 'M19 7h-8v6h8V7zm2-4H3C2 3 1 4 1 5v14c0 1 1 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zm0 16H3V5h18v14z'); @@ -278,10 +266,9 @@ ImprovedTube.improvedtubeYoutubeButtonsUnderPlayer = function () { button.className = 'improvedtube-player-button'; button.dataset.tooltip = 'Screenshot'; - + svg.style.opacity = '.55'; svg.setAttributeNS(null, 'viewBox', '0 0 24 24'); path.setAttributeNS(null, 'd', 'M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'); - button.onclick = ImprovedTube.screenshot; svg.appendChild(path); @@ -292,20 +279,16 @@ ImprovedTube.improvedtubeYoutubeButtonsUnderPlayer = function () { } } }; - /*------------------------------------------------------------------------------ - DESCRIPTION + EXPAND DESCRIPTION ------------------------------------------------------------------------------*/ - -ImprovedTube.descriptionLayout = function (el) { +ImprovedTube.expandDescription = function (el) { if (this.storage.description === "expanded" || this.storage.description === "classic_expanded" ) if(el)try{el.click()}catch{setTimeout(function(){el.click();},1000);} }; - /*------------------------------------------------------------------------------ HIDE DETAIL BUTTON ------------------------------------------------------------------------------*/ - ImprovedTube.hideDetailButton = function (el) { if (el.length === 4) { el[3].setAttribute("id", "Save-button"); @@ -317,11 +300,9 @@ ImprovedTube.hideDetailButton = function (el) { el[1].setAttribute("id", "Clip-button"); } }; - /*-------------------------------------------------------------- DAY OF WEEK --------------------------------------------------------------*/ - ImprovedTube.dayOfWeek = function () { var element = document.querySelector(".ytd-day-of-week"); if (this.storage.day_of_week === true) { @@ -342,11 +323,9 @@ ImprovedTube.dayOfWeek = function () { element.remove(); } }; - /*------------------------------------------------------------------------------ HOW LONG AGO THE VIDEO WAS UPLOADED ------------------------------------------------------------------------------*/ - ImprovedTube.howLongAgoTheVideoWasUploaded = function () { if (this.storage.how_long_ago_the_video_was_uploaded === true && this.elements.yt_channel_name) { var xhr = new XMLHttpRequest(), @@ -403,11 +382,9 @@ ImprovedTube.howLongAgoTheVideoWasUploaded = function () { xhr.send(); } }; - /*------------------------------------------------------------------------------ SHOW CHANNEL VIDEOS COUNT ------------------------------------------------------------------------------*/ - ImprovedTube.channelVideosCount = function () { if (this.storage.channel_videos_count === true && this.elements.yt_channel_link) { var key = this.storage["google-api-key"] || ImprovedTube.defaultApiKey; diff --git a/js&css/web-accessible/www.youtube.com/player.js b/js&css/web-accessible/www.youtube.com/player.js index bed646a71..7db1f82fa 100644 --- a/js&css/web-accessible/www.youtube.com/player.js +++ b/js&css/web-accessible/www.youtube.com/player.js @@ -537,9 +537,8 @@ ImprovedTube.screenshot = function () { cvs.toBlob(function (blob) { if (ImprovedTube.storage.player_screenshot_save_as !== 'clipboard') { - var a = document.createElement('a'); -console.log("screeeeeeen"); - a.href = URL.createObjectURL(blob); + var a = document.createElement('a'); + a.href = URL.createObjectURL(blob); console.log("screeeeeeenshot tada!"); a.download = location.href.match(/(\?|\&)v=[^&]+/)[0].substr(3) || location.href.match(/()embed\/[^&]+/)[0].substr(3) || improvedTube.videoID || location.href.match + '-' + new Date(ImprovedTube.elements.player.getCurrentTime() * 1000).toISOString().substr(11, 8).replace(/:/g, '-') + '.png'; @@ -570,7 +569,7 @@ ImprovedTube.playerScreenshotButton = function () { this.createPlayerButton({ id: 'it-screenshot-button', child: svg, - opacity: 1, + opacity: 0.64, onclick: this.screenshot, title: 'Screenshot' }); @@ -637,7 +636,7 @@ ImprovedTube.playerRotateButton = function () { this.createPlayerButton({ id: 'it-rotate-button', child: svg, - opacity: 1, + opacity: 0.85, onclick: function () { var player = ImprovedTube.elements.player, video = ImprovedTube.elements.video, @@ -693,7 +692,7 @@ ImprovedTube.playerPopupButton = function () { this.createPlayerButton({ id: 'it-popup-player-button', child: svg, - opacity: 1, + opacity: 0.8, onclick: function () { var player = ImprovedTube.elements.player; diff --git a/menu/styles/appearance.css b/menu/styles/appearance.css index ac8cad1bc..f26819d81 100644 --- a/menu/styles/appearance.css +++ b/menu/styles/appearance.css @@ -5,23 +5,18 @@ # Custom player size # Hide Detail Button --------------------------------------------------------------*/ - /*-------------------------------------------------------------- # BUTTONS --------------------------------------------------------------*/ - .satus-section--appearance { position: relative; - width: 100%; - max-width: 900px; + width: 100%; max-width: 900px; height: 100%; margin: auto; } - .satus-section--appearance .satus-button { position: absolute; - display: block; transition: transform .5s, box-shadow .5s; @@ -29,11 +24,10 @@ text-align: center; border: 1px solid var(--it-appearance-shadow-color); - border-radius: 3px; + border-radius: 3px; background: var(--satus-section-background); box-shadow: 0 0 2px 0 rgb(0 0 0 / 0%); } - .satus-section--appearance .satus-button:hover { z-index: 9; @@ -42,7 +36,6 @@ box-shadow: 1px 1px 0 0 var(--main-appearance-shadow, var(--it-appearance-shadow-color)), 2px 2px 0 0 var(--main-appearance-shadow, var(--it-appearance-shadow-color)), 3px 3px 0 0 var(--main-appearance-shadow, var(--it-appearance-shadow-color)), 4px 4px 0 0 var(--main-appearance-shadow, var(--it-appearance-shadow-color)), 5px 6px 4px 0 rgba(0, 0, 0, .1); } - .satus-section--appearance .satus-button--header { top: 16px; left: 16px; @@ -51,11 +44,9 @@ height: 29px; min-height: auto; } - .satus-section--appearance .satus-button--header:hover { transform: scale(1.03) translate(-9px, -4px); } - .satus-section--appearance .satus-button--player { top: 53px; left: 16px; @@ -111,12 +102,9 @@ width: calc(30% - 8px); height: 180px; } - - /*-------------------------------------------------------------- # CUSTOM PLAYER SIZE --------------------------------------------------------------*/ - .satus-section--custom-player-size { position: relative; @@ -157,20 +145,14 @@ content: 'x'; } - /*-------------------------------------------------------------- transcript compact spacing --------------------------------------------------------------*/ - #transcript:not([data-value='true']) + .satus-switch {display:none} - - /*-------------------------------------------------------------- DURATION WITH SPEED --------------------------------------------------------------*/ - #show-remaining-duration:not([data-value='true']) + .satus-switch { display: none; } - From f7b0979d77c7656ef9d6f98ebd8f377dfb816577 Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Fri, 7 Apr 2023 22:59:16 +0200 Subject: [PATCH 2/3] Update README.md --- .github/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/README.md b/.github/README.md index a263a4e0c..49113de43 100644 --- a/.github/README.md +++ b/.github/README.md @@ -25,10 +25,10 @@ - [i] ToolTips & documentation - [Auto](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1211) Avoiding CPU-rendering - Smart [Player buttons](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1445) for all \ - - Smart [content-filtering & discovery](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1451) + [#x](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1463) + - Smart [content-filtering & discovery](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1451) + [#X](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1463) - Full-page GUI, watch-history, dashboard - Integrating data [#1452](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1452), [SB](https://github.com/mchangrh/sb-mirror) / [NB](https://github.com/andrewzlee/NeuralBlock) etc. - - Continuously Integrating code /features
like: [YCS](https://github.com/sonigy/YCS), [YR](https://github.com/MarcGuiselin/youtube-refined), [NY](https://github.com/raingart/Nova-YouTube-extension); [IC](https://github.com/ThomasTavernier/Improve-Crunchyroll) + - Continuously Integrating code /features
like: [YCS](https://github.com/sonigy/YCS), [YR](https://github.com/MarcGuiselin/youtube-refined), [NY](https://github.com/raingart/Nova-YouTube-extension) ([ppixiv](https://github.com/ppixiv/ppixiv), [IC](https://github.com/ThomasTavernier/Improve-Crunchyroll)) - Run on m.youtube.com (grey-out some) - Ask Samsung Browser to list us. From ebce25b7e4ae53bebf86f81430b798fcae3c1c79 Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Fri, 7 Apr 2023 23:16:32 +0200 Subject: [PATCH 3/3] Update README.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 49113de43..04c416a8d 100644 --- a/.github/README.md +++ b/.github/README.md @@ -28,7 +28,7 @@ - Smart [content-filtering & discovery](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1451) + [#X](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1463) - Full-page GUI, watch-history, dashboard - Integrating data [#1452](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1452), [SB](https://github.com/mchangrh/sb-mirror) / [NB](https://github.com/andrewzlee/NeuralBlock) etc. - - Continuously Integrating code /features
like: [YCS](https://github.com/sonigy/YCS), [YR](https://github.com/MarcGuiselin/youtube-refined), [NY](https://github.com/raingart/Nova-YouTube-extension) ([ppixiv](https://github.com/ppixiv/ppixiv), [IC](https://github.com/ThomasTavernier/Improve-Crunchyroll)) + - Continuously Integrating code /features
like: [YCS](https://github.com/sonigy/YCS), [YR](https://github.com/MarcGuiselin/youtube-refined), [NY](https://github.com/raingart/Nova-YouTube-extension) (, [ppixiv](https://github.com/ppixiv/ppixiv), [IC](https://github.com/ThomasTavernier/Improve-Crunchyroll)) - Run on m.youtube.com (grey-out some) - Ask Samsung Browser to list us.