Merge branch 'main' into released

This commit is contained in:
Lawrence Hook
2026-02-08 20:13:22 -05:00
6 changed files with 72 additions and 51 deletions
+7 -4
View File
@@ -3,7 +3,7 @@
"description": "Spend less time on YouTube. Customize YouTube's user interface to be less engaging.",
"homepage_url": "https://github.com/lawrencehook/remove-youtube-suggestions",
"manifest_version": 3,
"version": "4.3.69",
"version": "4.3.70",
"icons": {
"16": "/images/16.png",
@@ -27,7 +27,9 @@
],
"css": ["/content-script/main.css"],
"all_frames": true,
"matches": ["*://*.youtube.com/*"],
"matches": [
"*://www.youtube.com/*",
"*://m.youtube.com/*"],
"run_at": "document_start"
}
],
@@ -51,10 +53,11 @@
"storage"
],
"host_permissions": [
"*://*.youtube.com/*"
"*://www.youtube.com/*",
"*://m.youtube.com/*"
],
"web_accessible_resources": [{
"resources": ["/images/rys.svg"],
"matches": ["*://*.youtube.com/*"]
"matches": ["*://www.youtube.com/*", "*://m.youtube.com/*"]
}]
}
+15 -2
View File
@@ -55,8 +55,9 @@ html[global_enable="true"][remove_footer_section="true"] #guide-renderer >
html[global_enable="true"][remove_header="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > div#header,
html[global_enable="true"][remove_all_but_one="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > #contents > ytd-rich-grid-row:nth-child(n+2),
html[global_enable="true"][remove_all_but_one="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > #contents > ytd-continuation-item-renderer,
html[global_enable="true"][remove_extra_rows="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > #contents > ytd-rich-grid-row + ytd-rich-section-renderer,
html[global_enable="true"][remove_extra_rows="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > #contents > ytd-rich-section-renderer,
html[global_enable="true"][remove_infinite_scroll="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > #contents > ytd-continuation-item-renderer,
html[global_enable="true"][remove_playables="true"] *[is_playable],
/* Video Player - UX */
html[global_enable="true"][disable_fullscreen_scroll="true"] ytd-watch-flexy[fullscreen] div#columns,
@@ -94,6 +95,14 @@ html[global_enable="true"][remove_comment_upvotes="true"] #vote-count-middle.ytd
html[global_enable="true"][remove_search_suggestions="true"] div.sbdd_a,
html[global_enable="true"][remove_search_promoted="true"] #container.ytd-search ytd-search-pyv-renderer,
html[global_enable="true"][remove_shorts_results="true"] #container.ytd-search ytd-video-renderer[is_short="true"],
html[global_enable="true"][remove_results_description="true"] #contents .metadata-snippet-container,
html[global_enable="true"][remove_results_description="true"] #contents .metadata-snippet-container-one-line,
html[global_enable="true"][remove_results_description="true"] #contents #description-text,
html[global_enable="true"][remove_results_description="true"] #contents #description,
html[global_enable="true"][remove_results_description="true"] #contents ytd-expandable-metadata-renderer,
html[global_enable="true"][remove_results_description="true"] #contents ytd-badge-supported-renderer,
html[global_enable="true"][remove_shorts_results="true"] #container.ytd-search ytd-reel-shelf-renderer,
html[global_enable="true"][remove_shorts_results="true"] #container.ytd-search grid-shelf-view-model.ytGridShelfViewModelHostHasBottomButton.ytd-item-section-renderer.ytGridShelfViewModelHost,
html[global_enable="true"][remove_extra_results="true"] #container.ytd-search ytd-shelf-renderer,
@@ -171,10 +180,14 @@ html[global_enable="true"][blur_video_thumbnails="true"] .video-thumbnail-img {
/* Shrink thumbnails */
html[global_enable="true"][shrink_video_thumbnails="true"] ytd-thumbnail,
html[global_enable="true"][shrink_video_thumbnails="true"] ytd-rich-item-renderer yt-thumbnail-view-model,
html[global_enable="true"][shrink_video_thumbnails="true"] ytd-playlist-thumbnail,
html[global_enable="true"][shrink_video_thumbnails="true"] *:has(> yt-collection-thumbnail-view-model),
html[global_enable="true"][shrink_video_thumbnails="true"] ytd-channel-renderer #avatar-section,
html[global_enable="true"][shrink_video_thumbnails="true"] ytd-movie-renderer .thumbnail-container {
max-width: 0 !important;
max-width: 240px !important;
min-width: 210px !important;
max-height: 134px;
}
+23 -31
View File
@@ -183,6 +183,15 @@ function runDynamicSettings() {
});
}
// Hide playables
if (cache['remove_playables']) {
const playableCards = qsa('ytd-mini-game-card-view-model');
playableCards?.forEach(card => {
const shelfContainer = card.closest('ytd-rich-section-renderer');
shelfContainer?.setAttribute('is_playable', '');
});
}
// Channel page option
if (onChannel) {
if (cache['remove_channel_for_you']) {
@@ -334,6 +343,15 @@ function runDynamicSettings() {
}
}
// Enable theater mode
if (cache['enable_theater']) {
const flexy = document.querySelector("ytd-watch-flexy");
const btn = document.querySelector(".ytp-size-button");
if (flexy && btn && !flexy.hasAttribute("theater")) {
btn.click();
}
}
// Skip through ads
if (cache['auto_skip_ads'] === true) {
@@ -418,6 +436,11 @@ function runDynamicSettings() {
}
}
// Hide notification number in title
if (cache['remove_notif_bell']) {
document.title = document.title.replace(/^\(\d+\)/g, '');
}
// Show video length when thumbnails are hidden
if (cache['search_engine_mode'] || cache['remove_video_thumbnails']) {
const thumbnails = qsa('ytd-thumbnail');
@@ -562,36 +585,6 @@ function injectAnnouncementBanners() {
});
}
function injectScripts() {
const on = cache['global_enable'] === true;
if (!on) return;
// Disable playlist autoplay
if (cache['disable_playlist_autoplay']) {
const existingScript = document.querySelector('script[id="disable_playlist_autoplay"]')
if (existingScript) return;
const script = document.createElement("script");
script.id = 'disable_playlist_autoplay';
script.type = "text/javascript";
script.innerText = `
(function() {
let pm, intervalId;
function f() {
if (!pm) pm = document.querySelector('yt-playlist-manager');
if (pm) {
pm.canAutoAdvance_ = false;
if (intervalId) clearInterval(intervalId);
}
}
f();
intervalId = setInterval(f, 100);
})()
`;
document.body?.appendChild(script);
}
}
function handleNewPage() {
@@ -658,7 +651,6 @@ function handleNewPage() {
}
}
injectScripts();
injectAnnouncementBanners();
requestRunDynamicSettings();
}
+6 -3
View File
@@ -3,7 +3,7 @@
"description": "Spend less time on YouTube. Customize YouTube's user interface to be less engaging.",
"homepage_url": "https://github.com/lawrencehook/remove-youtube-suggestions",
"manifest_version": 2,
"version": "4.3.69",
"version": "4.3.70",
"icons": {
"16": "/images/16.png",
@@ -30,7 +30,9 @@
],
"css": ["/content-script/main.css"],
"all_frames": true,
"matches": ["*://*.youtube.com/*"],
"matches": [
"*://www.youtube.com/*",
"*://m.youtube.com/*"],
"run_at": "document_start"
}
],
@@ -52,7 +54,8 @@
},
"permissions": [
"storage",
"*://*.youtube.com/*"
"*://www.youtube.com/*",
"*://m.youtube.com/*"
],
"web_accessible_resources": [
"/images/rys.svg"
+2
View File
@@ -152,6 +152,8 @@ function populateOptions(SECTIONS, headerSettings, SETTING_VALUES) {
qs('.sidebar_section[tag="Subscriptions"]').click();
} else if (channelRegex.test(currentUrl)) {
qs('.sidebar_section[tag="Channel"]').click();
} else if (homepageRegex.test(currentUrl)) {
qs('.sidebar_section[tag="Homepage"]').click();
} else {
qs('.sidebar_section[tag="Basic"]').click();
}
+19 -11
View File
@@ -105,6 +105,11 @@ const SECTIONS = [
id: "remove_infinite_scroll",
defaultValue: false
},
{
name: "Hide Playables",
id: "remove_playables",
defaultValue: false
},
]
},
{
@@ -241,11 +246,6 @@ const SECTIONS = [
id: "expand_description",
defaultValue: false
},
{
name: "Disable autoplay for playlists",
id: "disable_playlist_autoplay",
defaultValue: false
},
{
name: "Disable scroll in fullscreen",
id: "disable_fullscreen_scroll",
@@ -257,11 +257,11 @@ const SECTIONS = [
id: "normalize_shorts",
defaultValue: false
},
// {
// name: "Enable theater mode",
// id: "enable_theater",
// defaultValue: true
// },
{
name: "Enable theater mode",
id: "enable_theater",
defaultValue: false
},
]
},
{
@@ -413,6 +413,11 @@ const SECTIONS = [
id: "remove_shorts_results",
defaultValue: false
},
{
name: "Hide result description",
id: "remove_results_description",
defaultValue: false
},
{
name: "Hide results - For You, Trending, etc.",
id: "remove_extra_results",
@@ -671,7 +676,7 @@ const idToShortId = {
"disable_autoplay": '22',
"disable_ambient_mode": '23',
"disable_annotations": '24',
"disable_playlist_autoplay": '25',
"disable_playlist_autoplay": '25', // deprecated
"normalize_shorts": '26',
"remove_entire_sidebar": '27',
"remove_info_cards": '28',
@@ -739,6 +744,9 @@ const idToShortId = {
"add_reveal_button": '90', // deprecated; migrated to add_reveal_* settings
"remove_sidebar_infinite_scroll": '91',
"log_prompt_answered": '92',
"remove_results_description": '93',
"enable_theater": '94',
"remove_playables": '95',
};