From f6d277b0dc48bad469f67c4f8e704a6097d50271 Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Mon, 7 Aug 2023 11:48:24 +0200 Subject: [PATCH] comments --- js&css/web-accessible/functions.js | 35 ++++++++++++++++-------------- manifest.json | 2 +- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/js&css/web-accessible/functions.js b/js&css/web-accessible/functions.js index 7850a637f..ec5b58c00 100644 --- a/js&css/web-accessible/functions.js +++ b/js&css/web-accessible/functions.js @@ -34,24 +34,27 @@ ImprovedTube.ytElementsHandler = function (node) { } } else if (name === 'META') { if(node.getAttribute('name')) { - if(node.getAttribute('name') === 'themeColor') {ImprovedTube.themeColor = node.content;} - //if(node.getAttribute('name') === 'title') {ImprovedTube.title = node.content;} - //if(node.getAttribute('name') === 'description') {ImprovedTube.description = node.content;} + //if(node.getAttribute('name') === 'title') {ImprovedTube.title = node.content;} //duplicate + //if(node.getAttribute('name') === 'description') {ImprovedTube.description = node.content;} //duplicate + //if node.getAttribute('name') === 'themeColor') {ImprovedTube.themeColor = node.content;} //might help our darkmode/themes +//Do we need any of these here before the player starts? if(node.getAttribute('name') === 'keywords') {ImprovedTube.keywords = node.content;} } else if (node.getAttribute('itemprop')) { - if(node.getAttribute('itemprop') === 'name') {ImprovedTube.title = node.content;} - if(node.getAttribute('itemprop') === 'description') {ImprovedTube.description = node.content;} - if(node.getAttribute('itemprop') === 'paid') {ImprovedTube.paid = node.content;} - if(node.getAttribute('itemprop') === 'channelId') {ImprovedTube.channelId = node.content;} - if(node.getAttribute('itemprop') === 'videoId') {ImprovedTube.videoId = node.content;} - if(node.getAttribute('itemprop') === 'unlisted') {ImprovedTube.unlisted = node.content;} - // if(node.getAttribute('itemprop') === 'regionsAllowed'){ImprovedTube.regionsAllowed = node.content;} - if(node.getAttribute('itemprop') === 'duration') {ImprovedTube.duration = node.content;} - if(node.getAttribute('itemprop') === 'isFamilyFriendly'){ImprovedTube.isFamilyFriendly = node.content;} - if(node.getAttribute('itemprop') === 'interactionCount'){ImprovedTube.views = node.content;} - if(node.getAttribute('itemprop') === 'datePublished' ){ImprovedTube.datePublished = node.content;} - if(node.getAttribute('itemprop') === 'uploadDate') {ImprovedTube.uploadDate = node.content;} + if(node.getAttribute('itemprop') === 'name') {ImprovedTube.title = node.content;} if(node.getAttribute('itemprop') === 'genre') {ImprovedTube.category = node.content;} + //if(node.getAttribute('itemprop') === 'channelId') {ImprovedTube.channelId = node.content;} + //if(node.getAttribute('itemprop') === 'videoId') {ImprovedTube.videoId = node.content;} +//The following infos will enable awesome, smart features. Some of which everyone should use. + //if(node.getAttribute('itemprop') === 'description') {ImprovedTube.description = node.content;} + //if(node.getAttribute('itemprop') === 'duration') {ImprovedTube.duration = node.content;} + //if(node.getAttribute('itemprop') === 'interactionCount'){ImprovedTube.views = node.content;} + //if(node.getAttribute('itemprop') === 'isFamilyFriendly'){ImprovedTube.isFamilyFriendly = node.content;} + //if(node.getAttribute('itemprop') === 'unlisted') {ImprovedTube.unlisted = node.content;} + //if(node.getAttribute('itemprop') === 'regionsAllowed'){ImprovedTube.regionsAllowed = node.content;} + //if(node.getAttribute('itemprop') === 'paid') {ImprovedTube.paid = node.content;} + // if(node.getAttribute('itemprop') === 'datePublished' ){ImprovedTube.datePublished = node.content;} + //to use in the "how long ago"-feature, not to fail without API key? just like the "day-of-week"-feature above + // if(node.getAttribute('itemprop') === 'uploadDate') {ImprovedTube.uploadDate = node.content;} } } else if (name === 'YTD-TOGGLE-BUTTON-RENDERER' || name === 'YTD-PLAYLIST-LOOP-BUTTON-RENDERER') { if ( @@ -154,7 +157,7 @@ ImprovedTube.ytElementsHandler = function (node) { } else if (id === 'movie_player') { if (!this.elements.player) { ImprovedTube.elements.player = node; - ImprovedTube.elements.player.stopVideo(); + // if (this.storage.player_autoplay === false) { ImprovedTube.elements.player.stopVideo(); } ImprovedTube.elements.video = node.querySelector('video'); ImprovedTube.elements.player_left_controls = node.querySelector('.ytp-left-controls'); ImprovedTube.elements.player_thumbnail = node.querySelector('.ytp-cued-thumbnail-overlay-image'); diff --git a/manifest.json b/manifest.json index 419f1c58e..3108f6641 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "short_name" : "ImprovedTube", "name": "'Improve YouTube!' 🎧 (for YouTube & Videos)", "description": "__MSG_description_ext__", - "version": "4.27", + "version": "4.28", "default_locale": "en", "icons": { "16": "stuff/icons/16.png",