Remove play next button (firefox)

Remove more 'comments'
This commit is contained in:
Lawrence Hook
2021-12-12 18:36:40 -05:00
parent f5f428eac5
commit 2a7f8cb66f
6 changed files with 60 additions and 38 deletions
+4
View File
@@ -9,7 +9,11 @@ html[global_enable="true"][remove_home_link="true"] a:not(#logo)[href="/"],
html[global_enable="true"][remove_explore_link="true"] a[href="/feed/trending"],
html[global_enable="true"][remove_explore_link="true"] a[href="/feed/explore"],
html[global_enable="true"][remove_play_next_button="true"] a.ytp-next-button,
html[global_enable="true"][remove_comments="true"] #comments,
html[global_enable="true"][remove_comments="true"] #comment-teaser,
html[global_enable="true"][remove_comments="true"] ytd-engagement-panel-section-list-renderer[target-id="engagement-panel-comments-section"],
html[global_enable="true"][remove_chat="true"] #chat,
+2
View File
@@ -8,6 +8,7 @@ html[remove_info_cards="true"] .remove_info_cards .inactive,
html[remove_home_link="true"] .remove_home_link .inactive,
html[remove_logo_link="true"] .remove_logo_link .inactive,
html[remove_explore_link="true"] .remove_explore_link .inactive,
html[remove_play_next_button="true"] .remove_play_next_button .inactive,
html[remove_comments="true"] .remove_comments .inactive,
html[remove_chat="true"] .remove_chat .inactive,
html[redirect_off="true"] .redirect_off .inactive,
@@ -27,6 +28,7 @@ html[remove_info_cards="false"] .remove_info_cards .active,
html[remove_home_link="false"] .remove_home_link .active,
html[remove_logo_link="false"] .remove_logo_link .active,
html[remove_explore_link="false"] .remove_explore_link .active,
html[remove_play_next_button="false"] .remove_play_next_button .active,
html[remove_comments="false"] .remove_comments .active,
html[remove_chat="false"] .remove_chat .active,
html[redirect_off="false"] .redirect_off .active,
+21 -13
View File
@@ -1,18 +1,25 @@
if (typeof browser === 'undefined') {
browser = typeof chrome !== 'undefined' ? chrome : null;
}
// Some global constants.
const HTML = document.documentElement;
const SETTINGS_LIST = {
"global_enable": { defaultValue: true, eventType: 'click' },
"remove_homepage": { defaultValue: true, eventType: 'change' },
"remove_sidebar": { defaultValue: true, eventType: 'change' },
"remove_end_of_video": { defaultValue: true, eventType: 'change' },
"remove_info_cards": { defaultValue: false, eventType: 'change' },
"remove_home_link": { defaultValue: false, eventType: 'change' },
"remove_logo_link": { defaultValue: false, eventType: 'change' },
"remove_explore_link": { defaultValue: false, eventType: 'change' },
"remove_comments": { defaultValue: false, eventType: 'change' },
"remove_chat": { defaultValue: false, eventType: 'change' },
"redirect_off": { defaultValue: true, eventType: 'change' },
"redirect_to_subs": { defaultValue: false, eventType: 'change' },
"redirect_to_wl": { defaultValue: false, eventType: 'change' },
"global_enable": { defaultValue: true, eventType: 'click' },
"remove_homepage": { defaultValue: true, eventType: 'change' },
"remove_sidebar": { defaultValue: true, eventType: 'change' },
"remove_end_of_video": { defaultValue: true, eventType: 'change' },
"remove_info_cards": { defaultValue: false, eventType: 'change' },
"remove_home_link": { defaultValue: false, eventType: 'change' },
"remove_logo_link": { defaultValue: false, eventType: 'change' },
"remove_explore_link": { defaultValue: false, eventType: 'change' },
"remove_play_next_button": { defaultValue: false, eventType: 'change' },
"remove_comments": { defaultValue: false, eventType: 'change' },
"remove_chat": { defaultValue: false, eventType: 'change' },
"redirect_off": { defaultValue: true, eventType: 'change' },
"redirect_to_subs": { defaultValue: false, eventType: 'change' },
"redirect_to_wl": { defaultValue: false, eventType: 'change' },
};
// Initialize HTML attributes with local settings, or default.
@@ -30,4 +37,5 @@ try {
// receive messages from options.js
browser.runtime.onMessage.addListener((data, sender) => {
data.forEach(({ key, value }) => HTML.setAttribute(key, value));
return true;
});
+14 -13
View File
@@ -6,19 +6,20 @@ if (typeof browser === 'undefined') {
// Some global constants.
const HTML = document.documentElement;
const SETTINGS_LIST = {
"global_enable": { defaultValue: true, eventType: 'click' },
"remove_homepage": { defaultValue: true, eventType: 'click' },
"remove_sidebar": { defaultValue: true, eventType: 'click' },
"remove_end_of_video": { defaultValue: true, eventType: 'click' },
"remove_info_cards": { defaultValue: false, eventType: 'click' },
"remove_home_link": { defaultValue: false, eventType: 'click' },
"remove_logo_link": { defaultValue: false, eventType: 'click' },
"remove_explore_link": { defaultValue: false, eventType: 'click' },
"remove_comments": { defaultValue: false, eventType: 'click' },
"remove_chat": { defaultValue: false, eventType: 'click' },
"redirect_off": { defaultValue: true, eventType: 'click' },
"redirect_to_subs": { defaultValue: false, eventType: 'click' },
"redirect_to_wl": { defaultValue: false, eventType: 'click' },
"global_enable": { defaultValue: true, eventType: 'click' },
"remove_homepage": { defaultValue: true, eventType: 'click' },
"remove_sidebar": { defaultValue: true, eventType: 'click' },
"remove_end_of_video": { defaultValue: true, eventType: 'click' },
"remove_info_cards": { defaultValue: false, eventType: 'click' },
"remove_home_link": { defaultValue: false, eventType: 'click' },
"remove_logo_link": { defaultValue: false, eventType: 'click' },
"remove_explore_link": { defaultValue: false, eventType: 'click' },
"remove_play_next_button": { defaultValue: false, eventType: 'click' },
"remove_comments": { defaultValue: false, eventType: 'click' },
"remove_chat": { defaultValue: false, eventType: 'click' },
"redirect_off": { defaultValue: true, eventType: 'click' },
"redirect_to_subs": { defaultValue: false, eventType: 'click' },
"redirect_to_wl": { defaultValue: false, eventType: 'click' },
};
const VALID_SETTINGS = Object.keys(SETTINGS_LIST);
+12 -9
View File
@@ -1,12 +1,20 @@
{
"description": "Removes all suggestions from Youtube.",
"manifest_version": 2,
"name": "Remove Youtube Suggestions",
"version": "4.1.3",
"description": "Stop the YouTube rabbit hole. Customize YouTube's user interface to be less engaging.",
"homepage_url": "https://github.com/lawrencehook/remove-youtube-suggestions",
"manifest_version": 2,
"version": "4.2.0",
"icons": {
"16": "images/16.png",
"32": "images/32.png",
"64": "images/64.png",
"128": "images/128.png"
},
"background": {
"scripts": ["js/background.js"]
"scripts": ["js/background.js"],
"persistent": true
},
"content_scripts": [
@@ -23,11 +31,6 @@
}
],
"options_ui": {
"page": "options.html",
"open_in_tab": false
},
"browser_action": {
"default_popup": "options.html",
"default_title": "Remove Youtube Suggestions",
+7 -3
View File
@@ -58,6 +58,10 @@
<fieldset>
<legend>More removal options</legend>
<div class="remove_play_next_button">
<div class="option_name_container"><a class="active">🚫</a><a class="inactive">🟢</a> Play next button</div>
</div>
<div class="remove_comments">
<div class="option_name_container"><a class="active">🚫</a><a class="inactive">🟢</a> Comments</div>
</div>
@@ -73,7 +77,7 @@
</fieldset>
<fieldset>
<legend>Redirect the<a class="redirect_link" href="https://www.youtube.com/"> homepage ↗️</a></legend>
<legend>Redirect the<a class="redirect_link" href="https://www.youtube.com/" target="_blank"> homepage ↗️</a></legend>
<div class="redirect_off">
<div class="option_name_container"><a class="active">➡️</a><a class="inactive"></a> off</div>
@@ -83,14 +87,14 @@
<div class="redirect_to_subs">
<div class="option_name_container"><a class="active">➡️</a><a class="inactive"></a> to Subscriptions</div>
</div>
<a class="redirect_link" href="https://www.youtube.com/feed/subscriptions">↗️</a>
<a class="redirect_link" href="https://www.youtube.com/feed/subscriptions" target="_blank">↗️</a>
</div>
<div>
<div class="redirect_to_wl">
<div class="option_name_container"><a class="active">➡️</a><a class="inactive"></a> to Watch Later </div>
</div>
<a class="redirect_link" href="https://www.youtube.com/playlist/?list=WL">↗️</a>
<a class="redirect_link" href="https://www.youtube.com/playlist/?list=WL" target="_blank">↗️</a>
</div>
</fieldset>