Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/code-charity/youtube
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Dec 6, 2023
2 parents d42387b + eff34d5 commit 3bc76e1
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 69 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ assignees: ''
- ..deactivate other extensions running on YouTube? (or use an incognito window after activating this extension to run there / _chrome://extensions `details` chrome://extensions/?id=bnomihfieiccainjcjblhegjgglakjdd_ )
- ..open the Browser-console, with the `F12`-Key, before/when the error occures? (then hopefully you'll see an error message in the console).
- ...copy the YouTube-DOM shown above the console (`F12`) in case YouTube is giving you a new verson. You can copying the root element `<html>` in the top after the bug happened:
![chrome](https://github.com/code-charity/youtube/assets/25022245/ab976601-516a-40ad-970a-a5dbfc490c06)
![Firefox](https://github.com/code-charity/youtube/assets/25022245/d5c2cd43-b77c-4c65-b9ba-cb6e85a18d9c)
<img src="https://github.com/code-charity/youtube/assets/25022245/ab976601-516a-40ad-970a-a5dbfc490c06" height="90px"> (FireFox:) <img src="https://github.com/code-charity/youtube/assets/25022245/d5c2cd43-b77c-4c65-b9ba-cb6e85a18d9c" align="centered">
- There are 2-3 different versions depending if you open a new window or clicked a link on youtube

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Wish or Feature request, with BOUNTY PAYMENT
about: Wish or Feature request, with BOUNTY PAYMENT
title: ''
labels: Bounty!, Feature request, good first issue, help wanted
labels: Feature request, good first issue, help wanted
assignees: ''

---
Expand Down
4 changes: 2 additions & 2 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a href="https://apps.apple.com/us/app/improved-tube/id1672777754"><img src="https://img.shields.io/badge/%20-Safari-white?logo=safari&logoColor=black"></a> <a href="https://developer.whale.naver.com/detail/npfgdbojchpofhjdleehaoddbmbonbpa"><img src="https://img.shields.io/badge/%20-Whale-white?&logoColor=white&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAHSElEQVQYGZXBe2ydZR3A8e/vfZ9z67m06+W03ZV2m4zJLi4OQSJR/sCAQgQUIQSiCI5IiIkY0GhAxUBkGo2aACrGgIpGUSQmxERBSYwEVII42KBhjl3KdtauPdf38jzPz56xIW7dVj4fs2zdXRwvg0gOJINIBjAgGYQwQMKzQDYAY0Avb2gAO0GfR90zirNoClhUU9AU1RhIOZbhlASQtaDXK/Yy1K7gCBGwqUcCIQwE5bDdwKMgPwL5F6dgOCkZBP8NSK9DE5Qu5SjnoFjMYK0nSRwSMEeWCdwMcjPogxB8AZjkBAzzEuZ8DLUPqKZlUOYzMxNx6UXreXlimmf+uY9KOUdqHYEIYRigyrUgVwA3gPyUeRgQjqefV023gueoIBCi2CJALmfwXumrCL//wza8V0pFJU7aVAeKRHFKqx0TBMKcPAQPAWMgd3IMk3mtxWFWcSM5XCXzObHJVo7R6VgWj1RQhdcP1MlmDYFAHCuBQBAIYaC0O02cU0Q8eJDYIbFHLF/TQLSWdr7ebnQ4ysx8cgRUoZIh++zsJbkXG9/yFYOq0iUidCVJRCFfQUSwNiZjPO0opZDPICJ4VYJA6EQpYT0lO5WguQA7WqA5apjOxdBO73x3dfHEB9af9guOMNN3rYGMgDF9Q1c+/TtpdPDlPGEgiAjWerwq1aECr+05SKsdUynnAcfq8UXsnZzFq0IoBAdjslMxyZm9NK5YQWfzIqJlCoN5LhpazjX5JXyksOThPDwBHGCOYV8E5Qwy2Xgg99IhfC+4NKbSVySbDdlfa5AmloZP6enJggY4lxIGQqfTAbGI9WQmmqQryxz64jqaFy9Bl+ehNctZrsp3et/JOfRylFP/EPBB5hgUUFaJ6mV4i+IwxlBvtkDBpQkrx6tY69i1e4pCPkuX87Dv4AyFusXs71D/xEqmb1+PLi/BZAu2TbJlYC33jW6kyzuPRTniAmAd8IKhK3K3+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qJM4o93L50xc9vy+Tfcc8Lz9/B4CBhtgCJA4QuYY4ISbPB+sFRvrxkBbuiNqLgURbgHkQe4C3M3RN7OK0nz4ZKkc39vSQm95XK4PC6di53mSQelMMEUBE6zSbDxTKPrTmTyDsazmJEWICtwG2o8lamkAnZGUfs3N/k0cm9kMveVOopnZdzDrVKl4jQshbaHc7oX8SvN2ygmsnwcrtNJgjwqpyEAjcFIvcyDxMAxTCETDimkvsu8GEfWwQQQIDIWXCez4yPc8eqcXIi7Gi3yYigqpzEIwK3isirnIABVqDcjecq4RgKkfeNnAQ/eXjjWvvR0eGrd7U71X3WYkRQ5nUQeAz4ocDTnIIBYlGewrMd6AWKgAf2I2yzTp8cKGSmNvWW2d1uf2nWurNDWK+qS4Eyb2gCe4B/C/wNkRYL9F8bbVmxcL9YagAAAABJRU5ErkJggg=="></a> <a href="https://chrome.google.com/webstore/detail/improve-youtube-video-you/bnomihfieiccainjcjblhegjgglakjdd">
<a href="https://addons.mozilla.org/en-US/firefox/addon/youtube-addon/" title="Firefox recommends only 109 extensions"><img src="https://img.shields.io/badge/%20-Firefox-white?logo=firefoxbrowser&logoColor=orange"></a> <a href="https://chrome.google.com/webstore/detail/improve-youtube-video-you/bnomihfieiccainjcjblhegjgglakjdd"><img src="https://img.shields.io/badge/%20-Chrome-white?logo=googlechrome&logoColor=lightgrey"></a>
<a href="https://microsoftedge.microsoft.com/addons/detail/improve-youtube-video-/knbckijjjbmkjiagojjneoplbjilfllc"><img src="https://img.shields.io/badge/%20Edge%20%20-white?logo=microsoftedge&logoColor=teal"></a>
<a href="https://addons.opera.com/de/extensions/details/improvedtube-youtube-extension/"><img src="https://img.shields.io/badge/%20-Opera-white?logo=opera&logoColor=red"></a>[<img src="github.png" height="18px"> ](https://github.com/code-for-charity/ImprovedTube-for-YouTube/releases/latest "Release.zip") <br> <a href="https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/new">Report a bug</a> ·
<a href="https://addons.opera.com/de/extensions/details/improvedtube-youtube-extension/"><img src="https://img.shields.io/badge/%20-Opera-white?logo=opera&logoColor=red"></a>[<img src="github.png" height="18px"> ](https://github.com/code-for-charity/ImprovedTube-for-YouTube/releases/latest "Release.zip") <br> <a href="https://github.com/code-charity/youtube/issues/new?assignees=&labels=Bug%2C+good+first+issue%2C+help+wanted%2C+up-for-grabs&projects=&template=bug_report.md&title=">Report a bug</a> ·
<a href="https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/new?assignees=&labels=Feature+request%2C+help+wanted&template=feature-request---suggestion---idea.md&title=">Wish a feature</a> ·
<a href="https://github.com/code-for-charity/ImprovedTube-for-YouTube/wiki/Contributing">Contribute</a> ·
<a href="https://github.com/code-for-charity/ImprovedTube-for-YouTube/wiki/Contributing#donate">Donate</a> · [Test🧪](https://github.com/code-for-charity/ImprovedTube-for-YouTube/archive/refs/heads/master.zip "Latest.zip") </td></tr></table>
Expand Down Expand Up @@ -41,7 +41,7 @@ Today adding features can be easier & so motivating as there are 500 000 users.
- [ ] Documentation, tooltips
- [ ] Full-page GUI, watch-history, dashboard
- [ ] Clean YT's DOM & avoid CPU-rendering
- [ ] Smart [filtering /discovery](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1451), [tl](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1463), [md](https://github.com/code-charity/youtube/issues?q=is%3Aopen+sort%3Aupdated-desc+label%3A%22%3Cmeta%3E+data%22)
- [ ] Smart [filtering /discovery](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1451), [YT.js](https://github.com/LuanRT/YouTube.js), [M](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1463), [D](https://github.com/code-charity/youtube/issues?q=is%3Aopen+sort%3Aupdated-desc+label%3A%22%3Cmeta%3E+data%22)
- [ ] Smart Player-[buttons](https://github.com/code-for-charity/ImprovedTube-for-YouTube/issues/1445) for all \<video\>
- [ ] Continuously include awesome code: [YCS](https://github.com/sonigy/YCS)<br>[Yr](https://github.com/MarcGuiselin/youtube-refined)filters, UserScripts, [n](https://github.com/raingart/Nova-YouTube-extension) & **([i](https://github.com/ThomasTavernier/Improve-Crunchyroll)**, [p](https://github.com/ppixiv/ppixiv), [r](https://github.com/refined-github/refined-github) [o](https://github.com/ovity/octotree), ..)
- [ ] Run on m.youtube.com (grey-out some)
Expand Down
6 changes: 4 additions & 2 deletions js&css/extension/www.youtube.com/appearance/player/player.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ html[it-hide-scroll-for-details='true'] ytd-app[scrolling_] {
/*--------------------------------------------------------------
# Player Size
--------------------------------------------------------------*/
/*required for firefox' autoplay:off only: */
html[data-page-type="video"][it-player-size]:not([it-player-size='do_not_change']) #movie-player .ytp-cued-thumbnail-overlay { z-index:10 }

/*--------------------------------------------------------------
# NORMAL
Expand Down Expand Up @@ -386,7 +388,7 @@ html[data-page-type=video][it-player-size='max_width'] ytd-watch-flexy:not([full
justify-content: center !important}

html[data-page-type=video][it-player-size='max_width'] {
--it-player-size: 100vh;}
--it-player-size: 86vh;}

html[data-page-type=video][it-player-size='max_width'] .ytp-fit-cover-video .html5-main-video {
object-fit: contain !important;}
Expand Down Expand Up @@ -583,4 +585,4 @@ html[it-player-hide-skip-overlay=true] .ytp-doubletap-ui, .ytp-doubletap-ui-lega
--------------------------------------------------------------*/
html[it-hide-video-title-fullScreen='true'] .ytp-title-text > a {
display: none !important;
}
}
4 changes: 2 additions & 2 deletions js&css/web-accessible/www.youtube.com/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ if (DATA.keywords && !keywords) { keywords = DATA.keywords.join(', ') || ''; }
if (keywords === 'video, sharing, camera phone, video phone, free, upload') { keywords = ''; }
var musicIdentifiers = /(official|music|lyrics)[ -]video|(cover|studio|radio|album|alternate)[- ]version|soundtrack|unplugged|\bmedley\b|\blo-fi\b|\blofi\b|a(lla)? cappella|feat\.|(piano|guitar|jazz|ukulele|violin|reggae)[- ](version|cover)|karaok|backing[- ]track|instrumental|(sing|play)[- ]?along|卡拉OK|卡拉OK|الكاريوكي|караоке|カラオケ|노래방|bootleg|mashup|Radio edit|Guest (vocals|musician)|(title|opening|closing|bonus|hidden)[ -]track|live acoustic|interlude|featuring|recorded (at|live)/i;
var musicIdentifiersTitleOnly = /lyrics|theme song|\bremix|\bAMV ?[^a-z0-9]|[^a-z0-9] ?AMV\b|\bfull song\b|\bsong:|\bsong[\!$]|^song\b|( - .*\bSong\b|\bSong\b.* - )|cover ?[^a-z0-9]|[^a-z0-9] ?cover|\bconcert\b/i;
var musicIdentifiersTitle = new RegExp(musicIdentifiersTitleOnly.source + musicIdentifiers.source, "i");
var musicIdentifiersTitle = new RegExp(musicIdentifiersTitleOnly.source + '|' + musicIdentifiers.source, "i");
var musicRegexMatch = musicIdentifiersTitle.test(DATA.title);
if (!musicRegexMatch) {
var musicIdentifiersTagsOnly = /, (lyrics|remix|song|music|AMV|theme song|full song),|\(Musical Genre\)|, jazz|, reggae/i;
var musicIdentifiersTags = new RegExp(musicIdentifiersTagsOnly.source + musicIdentifiers.source, "i");
var musicIdentifiersTags = new RegExp(musicIdentifiersTagsOnly.source + '|' + musicIdentifiers.source, "i");
keywordsAmount = 1 + ((keywords || '').match(/,/) || []).length;
if ( ((keywords || '').match(musicIdentifiersTags) || []).length / keywordsAmount > 0.08) {
musicRegexMatch = true}}
Expand Down
16 changes: 4 additions & 12 deletions js&css/web-accessible/www.youtube.com/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,28 +587,20 @@ ImprovedTube.shortcutTranscript = function () {
/*------------------------------------------------------------------------------
4.7.22 LIKE
------------------------------------------------------------------------------*/

ImprovedTube.shortcutLike = function () {
var like = (document.querySelectorAll('#menu #top-level-buttons-computed ytd-toggle-button-renderer button')[0]);
if (like) {
like.click();
}
var like = document.querySelector('#menu #top-level-buttons-computed #segmented-like-button ytd-toggle-button-renderer button');
if (like) {like.click();}
};


/*------------------------------------------------------------------------------
4.7.23 DISLIKE
------------------------------------------------------------------------------*/

ImprovedTube.shortcutDislike = function () {
var like = (document.querySelectorAll('#menu #top-level-buttons-computed ytd-toggle-button-renderer button')[1]);
if (like) {
like.click();
}
var dislike = document.querySelector('#menu #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer button');
if (dislike) { dislike.click();}
};

/*------Report------*/

ImprovedTube.shortcutReport = function () {
try{document.querySelectorAll("tp-yt-iron-dropdown").forEach(el => el.style.opacity = 0);
document.querySelector('svg path[d^="M7.5,12c0,0.83-0.67,1.5-1.5"]').closest("button").click();document.querySelectorAll("tp-yt-iron-dropdown").forEach(el => el.style.opacity = 0)}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"short_name" : "ImprovedTube",
"name": "'Improve YouTube!' 🎧 (for YouTube & Videos)",
"description": "__MSG_description_ext__",
"version": "4.443",
"version": "4.500",
"default_locale": "en",
"icons": {
"16": "stuff/icons/16.png",
Expand Down
95 changes: 48 additions & 47 deletions menu/index.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>ImprovedTube</title>
<style>
body {
width: 320px;
height: 500px;
margin: 0
}
</style>
<link rel="stylesheet" href="../js&css/satus.css">
<link rel="stylesheet" href="styles/analyzer.css">
<link rel="stylesheet" href="styles/appearance.css">
<link rel="stylesheet" href="styles/player.css">
<link rel="stylesheet" href="styles/blacklist.css">
<link rel="stylesheet" href="styles/fonts.css">
<link rel="stylesheet" href="styles/header.css">
<link rel="stylesheet" href="styles/home.css">
<link rel="stylesheet" href="styles/mixer.css">
<link rel="stylesheet" href="styles/night-mode.css">
<link rel="stylesheet" href="styles/search.css">
<link rel="stylesheet" href="styles/settings.css">
<link rel="stylesheet" href="styles/themes.css">
<script src="../js&css/satus.js"></script>
<script src="index.js"></script>
<script src="skeleton.js"></script>
<script src="skeleton-parts/search.js"></script>
<script src="skeleton-parts/active-features.js"></script>
<script src="skeleton-parts/settings.js"></script>
<script src="skeleton-parts/night-mode.js"></script>
<script src="skeleton-parts/mixer.js"></script>
<script src="skeleton-parts/general.js"></script>
<script src="skeleton-parts/appearance.js"></script>
<script src="skeleton-parts/themes.js"></script>
<script src="skeleton-parts/player.js"></script>
<script src="skeleton-parts/playlist.js"></script>
<script src="skeleton-parts/channel.js"></script>
<script src="skeleton-parts/shortcuts.js"></script>
<script src="skeleton-parts/blacklist.js"></script>
<script src="skeleton-parts/analyzer.js"></script>
<script src="functions.js"></script>
</head>
<body>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>ImprovedTube</title>
<style>
body {
width: 320px;
height: 500px;
margin: 0;
}
</style>
<link rel="stylesheet" href="../js&css/satus.css">
<link rel="stylesheet" href="styles/analyzer.css">
<link rel="stylesheet" href="styles/appearance.css">
<link rel="stylesheet" href="styles/player.css">
<link rel="stylesheet" href="styles/blacklist.css">
<link rel="stylesheet" href="styles/fonts.css">
<link rel="stylesheet" href="styles/header.css">
<link rel="stylesheet" href="styles/home.css">
<link rel="stylesheet" href="styles/mixer.css">
<link rel="stylesheet" href="styles/night-mode.css">
<link rel="stylesheet" href="styles/search.css">
<link rel="stylesheet" href="styles/settings.css">
<link rel="stylesheet" href="styles/themes.css">
<script src="../js&css/satus.js" async></script>
<script src="index.js" async></script>
</head>
<body>

<script src="skeleton.js" async></script>
<script src="skeleton-parts/search.js" async></script>
<script src="skeleton-parts/active-features.js" async></script>
<script src="skeleton-parts/settings.js" async></script>
<script src="skeleton-parts/night-mode.js" async></script>
<script src="skeleton-parts/mixer.js" async></script>
<script src="skeleton-parts/general.js" async></script>
<script src="skeleton-parts/appearance.js" async></script>
<script src="skeleton-parts/themes.js" async></script>
<script src="skeleton-parts/player.js" async></script>
<script src="skeleton-parts/playlist.js" async></script>
<script src="skeleton-parts/channel.js" async></script>
<script src="skeleton-parts/shortcuts.js" async></script>
<script src="skeleton-parts/blacklist.js" async></script>
<script src="skeleton-parts/analyzer.js" async></script>
<script src="functions.js" async></script>
</body>
</html>

0 comments on commit 3bc76e1

Please sign in to comment.