Less Mixes for YouTube
+1
-1
| { | ||
| "name": "Less Mixes for YouTube", | ||
| "description": "Prevent YouTube Mix generation for music videos", | ||
| "version": "3.0.0", | ||
| "version": "3.1.0", | ||
| "manifest_version": 3, | ||
@@ -6,0 +6,0 @@ "action": { |
+48
-14
@@ -9,7 +9,9 @@ const STORAGE_KEYS = [ | ||
| MUSIC_VIDEO: 1, | ||
| GENERIC_MIX: 2, | ||
| MY_MIX: 3, | ||
| GENERIC_MIX_1: 2, | ||
| GENERIC_MIX_2: 3, | ||
| MY_MIX: 4, | ||
| MUSIC_VIDEO_MOBILE: 11, | ||
| GENERIC_MIX_MOBILE: 12, | ||
| MY_MIX_MOBILE: 13, | ||
| GENERIC_MIX_MOBILE_1: 12, | ||
| GENERIC_MIX_MOBILE_2: 13, | ||
| MY_MIX_MOBILE: 14, | ||
| }; | ||
@@ -28,3 +30,3 @@ | ||
| condition: { | ||
| regexFilter: "^https://www\\.youtube\\.com/watch\\?v=([^&]*)&list=RD(?:[^M]M|M[^M]|[^M][^M])[^&]{9}&start_radio=1&pp=.*$", | ||
| regexFilter: "^https://www\\.youtube\\.com/watch\\?v=([^&]*)&list=RD[^&]{11}&start_radio=1&pp=.*$", | ||
| isUrlFilterCaseSensitive: true, | ||
@@ -35,3 +37,3 @@ resourceTypes: ["main_frame"] | ||
| { | ||
| id: RULE_IDS.GENERIC_MIX, | ||
| id: RULE_IDS.GENERIC_MIX_1, | ||
| priority: 1, | ||
@@ -45,3 +47,3 @@ action: { | ||
| condition: { | ||
| regexFilter: "^https://www\\.youtube\\.com/watch\\?v=([^&]*)&list=RD(?:[^M]M|M[^M]|[^M][^M])[^&]*&start_radio=1", | ||
| regexFilter: "^https://www\\.youtube\\.com/watch\\?v=([^&]*)&list=RD[^&]{11}&start_radio=1", | ||
| isUrlFilterCaseSensitive: true, | ||
@@ -52,2 +54,17 @@ resourceTypes: ["main_frame"] | ||
| { | ||
| id: RULE_IDS.GENERIC_MIX_2, | ||
| priority: 1, | ||
| action: { | ||
| type: "redirect", | ||
| redirect: { | ||
| regexSubstitution: "https://www.youtube.com/watch?v=\\1" | ||
| } | ||
| }, | ||
| condition: { | ||
| regexFilter: "^https://www\\.youtube\\.com/watch\\?v=([^&]*)&list=RD[^&]{26}&start_radio=1", | ||
| isUrlFilterCaseSensitive: true, | ||
| resourceTypes: ["main_frame"] | ||
| } | ||
| }, | ||
| { | ||
| id: RULE_IDS.MY_MIX, | ||
@@ -62,3 +79,3 @@ priority: 1, | ||
| condition: { | ||
| regexFilter: "^https://www\\.youtube\\.com/watch\\?v=([^&]*)&list=RDMM.*&start_radio=1", | ||
| regexFilter: "^https://www\\.youtube\\.com/watch\\?v=([^&]*)&list=RDMM[^&]{11}&start_radio=1", | ||
| isUrlFilterCaseSensitive: true, | ||
@@ -78,3 +95,3 @@ resourceTypes: ["main_frame"] | ||
| condition: { | ||
| regexFilter: "^https://m\\.youtube\\.com/watch\\?v=([^&]*)&list=RD(?:[^M]M|M[^M]|[^M][^M])[^&]{9}&start_radio=1&pp=.*$", | ||
| regexFilter: "^https://m\\.youtube\\.com/watch\\?v=([^&]*)&list=RD[^&]{11}&start_radio=1&pp=.*$", | ||
| isUrlFilterCaseSensitive: true, | ||
@@ -85,3 +102,3 @@ resourceTypes: ["main_frame"] | ||
| { | ||
| id: RULE_IDS.GENERIC_MIX_MOBILE, | ||
| id: RULE_IDS.GENERIC_MIX_MOBILE_1, | ||
| priority: 1, | ||
@@ -95,3 +112,3 @@ action: { | ||
| condition: { | ||
| regexFilter: "^https://m\\.youtube\\.com/watch\\?v=([^&]*)&list=RD(?:[^M]M|M[^M]|[^M][^M])[^&]*&start_radio=1", | ||
| regexFilter: "^https://m\\.youtube\\.com/watch\\?v=([^&]*)&list=RD[^&]{11}&start_radio=1", | ||
| isUrlFilterCaseSensitive: true, | ||
@@ -102,2 +119,17 @@ resourceTypes: ["main_frame"] | ||
| { | ||
| id: RULE_IDS.GENERIC_MIX_MOBILE_2, | ||
| priority: 1, | ||
| action: { | ||
| type: "redirect", | ||
| redirect: { | ||
| regexSubstitution: "https://m.youtube.com/watch?v=\\1" | ||
| } | ||
| }, | ||
| condition: { | ||
| regexFilter: "^https://m\\.youtube\\.com/watch\\?v=([^&]*)&list=RD[^&]{26}&start_radio=1", | ||
| isUrlFilterCaseSensitive: true, | ||
| resourceTypes: ["main_frame"] | ||
| } | ||
| }, | ||
| { | ||
| id: RULE_IDS.MY_MIX_MOBILE, | ||
@@ -112,3 +144,3 @@ priority: 1, | ||
| condition: { | ||
| regexFilter: "^https://m\\.youtube\\.com/watch\\?v=([^&]*)&list=RDMM.*&start_radio=1", | ||
| regexFilter: "^https://m\\.youtube\\.com/watch\\?v=([^&]*)&list=RDMM[^&]{11}&start_radio=1", | ||
| isUrlFilterCaseSensitive: true, | ||
@@ -126,4 +158,6 @@ resourceTypes: ["main_frame"] | ||
| toggles.musicVideoToggle && RULE_IDS.MUSIC_VIDEO_MOBILE, | ||
| toggles.genericMixToggle && RULE_IDS.GENERIC_MIX, | ||
| toggles.genericMixToggle && RULE_IDS.GENERIC_MIX_MOBILE, | ||
| toggles.genericMixToggle && RULE_IDS.GENERIC_MIX_1, | ||
| toggles.genericMixToggle && RULE_IDS.GENERIC_MIX_2, | ||
| toggles.genericMixToggle && RULE_IDS.GENERIC_MIX_MOBILE_1, | ||
| toggles.genericMixToggle && RULE_IDS.GENERIC_MIX_MOBILE_2, | ||
| toggles.myMixToggle && RULE_IDS.MY_MIX, | ||
@@ -130,0 +164,0 @@ toggles.myMixToggle && RULE_IDS.MY_MIX_MOBILE |
@@ -26,3 +26,3 @@ let musicVideoToggle = false; | ||
| document.addEventListener("click", function (e) { | ||
| if (e.target.closest(".yt-lockup-metadata-view-model__menu-button, .dropdown-trigger, #channel-name, #channel-thumbnail, yt-decorated-avatar-view-model, .yt-core-attributed-string__link.yt-core-attributed-string__link--call-to-action-color, ytm-channel-thumbnail-with-link-renderer")) return; | ||
| if (e.target.closest(".yt-lockup-metadata-view-model__menu-button, .dropdown-trigger, #channel-name, #channel-thumbnail, yt-decorated-avatar-view-model, .yt-core-attributed-string__link.yt-core-attributed-string__link--call-to-action-color, ytm-channel-thumbnail-with-link-renderer, .ytThumbnailHoverOverlayToggleActionsViewModelButton, .media-channel, .media-item-menu")) return; | ||
@@ -49,5 +49,5 @@ const container = e.target.closest("yt-lockup-view-model, ytd-video-renderer, ytm-video-with-context-renderer, ytm-compact-radio-renderer, ytm-rich-item-renderer"); | ||
| const shouldMusicVideoToggle = pp && list && list.startsWith("RD") && !list.startsWith("RDMM") && !index && musicVideoToggle; | ||
| const shouldGenericMixToggle = !pp && list && list.startsWith("RD") && !list.startsWith("RDMM") && !index && genericMixToggle; | ||
| const shouldMyMixToggle = list && list.startsWith("RDMM") && !index && myMixToggle; | ||
| const shouldMusicVideoToggle = pp && list && list.startsWith("RD") && list.length == 13 && !index && musicVideoToggle; | ||
| const shouldGenericMixToggle = !pp && list && list.startsWith("RD") && list.length != 15 && !index && genericMixToggle; | ||
| const shouldMyMixToggle = list && list.startsWith("RDMM") && list.length == 15 && !index && myMixToggle; | ||
@@ -54,0 +54,0 @@ const shouldRedirect = shouldMusicVideoToggle || shouldGenericMixToggle || shouldMyMixToggle; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet