YouTube - Non-Rounded Design

This script disables YouTube's new rounded corners (reverts back to the previous layout before 2022 with extra stuff included.)

目前为 2023-02-14 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube - Non-Rounded Design
  3. // @version 3.3.0
  4. // @description This script disables YouTube's new rounded corners (reverts back to the previous layout before 2022 with extra stuff included.)
  5. // @author Magma_Craft
  6. // @license MIT
  7. // @match https://www.youtube.com/*
  8. // @namespace https://greasyfork.org/en/users/933798
  9. // @icon https://www.youtube.com/favicon.ico
  10. // @run-at document-start
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. // Attributes to remove from <html>
  15. const ATTRS = [
  16. "darker-dark-theme",
  17. "darker-dark-theme-deprecate"
  18. ];
  19.  
  20. // Regular config keys.
  21. const CONFIGS = {
  22. BUTTON_REWORK: false
  23. }
  24.  
  25. // Experiment flags.
  26. const EXPFLAGS = {
  27. enable_header_channel_handler_ui: false,
  28. kevlar_unavailable_video_error_ui_client: false,
  29. kevlar_refresh_on_theme_change: false,
  30. kevlar_watch_cinematics: false,
  31. kevlar_watch_metadata_refresh: false,
  32. kevlar_watch_modern_metapanel: false,
  33. web_amsterdam_playlists: false,
  34. web_animated_like: false,
  35. web_button_rework: false,
  36. web_button_rework_with_live: false,
  37. web_darker_dark_theme: false,
  38. web_filled_subscribed_button: false,
  39. web_guide_ui_refresh: false,
  40. web_modern_ads: false,
  41. web_modern_buttons: false,
  42. web_modern_chips: false,
  43. web_modern_dialogs: false,
  44. web_modern_playlists: false,
  45. web_modern_subscribe: false,
  46. web_rounded_containers: false,
  47. web_rounded_thumbnails: false,
  48. web_searchbar_style: "default",
  49. web_segmented_like_dislike_button: false,
  50. web_sheets_ui_refresh: false,
  51. web_snackbar_ui_refresh: false
  52. }
  53.  
  54. // Player flags
  55. // !!! USE STRINGS FOR VALUES !!!
  56. // For example: "true" instead of true
  57. const PLYRFLAGS = {
  58. web_rounded_containers: "false",
  59. web_rounded_thumbnails: "false"
  60. }
  61.  
  62. class YTP {
  63. static observer = new MutationObserver(this.onNewScript);
  64.  
  65. static _config = {};
  66.  
  67. static isObject(item) {
  68. return (item && typeof item === "object" && !Array.isArray(item));
  69. }
  70.  
  71. static mergeDeep(target, ...sources) {
  72. if (!sources.length) return target;
  73. const source = sources.shift();
  74.  
  75. if (this.isObject(target) && this.isObject(source)) {
  76. for (const key in source) {
  77. if (this.isObject(source[key])) {
  78. if (!target[key]) Object.assign(target, { [key]: {} });
  79. this.mergeDeep(target[key], source[key]);
  80. } else {
  81. Object.assign(target, { [key]: source[key] });
  82. }
  83. }
  84. }
  85.  
  86. return this.mergeDeep(target, ...sources);
  87. }
  88.  
  89.  
  90. static onNewScript(mutations) {
  91. for (var mut of mutations) {
  92. for (var node of mut.addedNodes) {
  93. YTP.bruteforce();
  94. }
  95. }
  96. }
  97.  
  98. static start() {
  99. this.observer.observe(document, {childList: true, subtree: true});
  100. }
  101.  
  102. static stop() {
  103. this.observer.disconnect();
  104. }
  105.  
  106. static bruteforce() {
  107. if (!window.yt) return;
  108. if (!window.yt.config_) return;
  109.  
  110. this.mergeDeep(window.yt.config_, this._config);
  111. }
  112.  
  113. static setCfg(name, value) {
  114. this._config[name] = value;
  115. }
  116.  
  117. static setCfgMulti(configs) {
  118. this.mergeDeep(this._config, configs);
  119. }
  120.  
  121. static setExp(name, value) {
  122. if (!("EXPERIMENT_FLAGS" in this._config)) this._config.EXPERIMENT_FLAGS = {};
  123.  
  124. this._config.EXPERIMENT_FLAGS[name] = value;
  125. }
  126.  
  127. static setExpMulti(exps) {
  128. if (!("EXPERIMENT_FLAGS" in this._config)) this._config.EXPERIMENT_FLAGS = {};
  129.  
  130. this.mergeDeep(this._config.EXPERIMENT_FLAGS, exps);
  131. }
  132.  
  133. static decodePlyrFlags(flags) {
  134. var obj = {},
  135. dflags = flags.split("&");
  136.  
  137. for (var i = 0; i < dflags.length; i++) {
  138. var dflag = dflags[i].split("=");
  139. obj[dflag[0]] = dflag[1];
  140. }
  141.  
  142. return obj;
  143. }
  144.  
  145. static encodePlyrFlags(flags) {
  146. var keys = Object.keys(flags),
  147. response = "";
  148.  
  149. for (var i = 0; i < keys.length; i++) {
  150. if (i > 0) {
  151. response += "&";
  152. }
  153. response += keys[i] + "=" + flags[keys[i]];
  154. }
  155.  
  156. return response;
  157. }
  158.  
  159. static setPlyrFlags(flags) {
  160. if (!window.yt) return;
  161. if (!window.yt.config_) return;
  162. if (!window.yt.config_.WEB_PLAYER_CONTEXT_CONFIGS) return;
  163. var conCfgs = window.yt.config_.WEB_PLAYER_CONTEXT_CONFIGS;
  164. if (!("WEB_PLAYER_CONTEXT_CONFIGS" in this._config)) this._config.WEB_PLAYER_CONTEXT_CONFIGS = {};
  165.  
  166. for (var cfg in conCfgs) {
  167. var dflags = this.decodePlyrFlags(conCfgs[cfg].serializedExperimentFlags);
  168. this.mergeDeep(dflags, flags);
  169. this._config.WEB_PLAYER_CONTEXT_CONFIGS[cfg] = {
  170. serializedExperimentFlags: this.encodePlyrFlags(dflags)
  171. }
  172. }
  173. }
  174. }
  175.  
  176. window.addEventListener("yt-page-data-updated", function tmp() {
  177. YTP.stop();
  178. for (i = 0; i < ATTRS.length; i++) {
  179. document.getElementsByTagName("html")[0].removeAttribute(ATTRS[i]);
  180. }
  181. window.removeEventListener("yt-page-date-updated", tmp);
  182. });
  183.  
  184. YTP.start();
  185.  
  186. YTP.setCfgMulti(CONFIGS);
  187. YTP.setExpMulti(EXPFLAGS);
  188. YTP.setPlyrFlags(PLYRFLAGS);
  189.  
  190. function $(q) {
  191. return document.querySelector(q);
  192. }
  193.  
  194. // Re-add 'Explore' tab in sidebar (it also replaces the 'Shorts' tab)
  195. function waitForElm(selector) {
  196. return new Promise(resolve => {
  197. if (document.querySelector(selector)) {
  198. return resolve(document.querySelector(selector));
  199. }
  200.  
  201. const observer = new MutationObserver(mutations => {
  202. if (document.querySelector(selector)) {
  203. resolve(document.querySelector(selector));
  204. observer.disconnect();
  205. }
  206. });
  207.  
  208. observer.observe(document.body, {
  209. childList: true,
  210. subtree: true
  211. });
  212. });
  213. }
  214.  
  215. function restoreTrending() {
  216.  
  217. var trendingData = {
  218. "navigationEndpoint": {
  219. "clickTrackingParams": "CBwQtSwYASITCNqYh-qO_fACFcoRrQYdP44D9Q==",
  220. "commandMetadata": {
  221. "webCommandMetadata": {
  222. "url": "/feed/explore",
  223. "webPageType": "WEB_PAGE_TYPE_BROWSE",
  224. "rootVe": 6827,
  225. "apiUrl": "/youtubei/v1/browse"
  226. }
  227. },
  228. "browseEndpoint": {
  229. "browseId": "FEtrending"
  230. }
  231. },
  232. "icon": {
  233. "iconType": "EXPLORE"
  234. },
  235. "trackingParams": "CBwQtSwYASITCNqYh-qO_fACFcoRrQYdP44D9Q==",
  236. "formattedTitle": {
  237. "simpleText": "Explore"
  238. },
  239. "accessibility": {
  240. "accessibilityData": {
  241. "label": "Explore"
  242. }
  243. },
  244. "isPrimary": true
  245. };
  246.  
  247. var guidetemplate = `<ytd-guide-entry-renderer class="style-scope ytd-guide-section-renderer" is-primary="" line-end-style="none"><!--css-build:shady--><a id="endpoint" class="yt-simple-endpoint style-scope ytd-guide-entry-renderer" tabindex="-1" role="tablist"><tp-yt-paper-item role="tab" class="style-scope ytd-guide-entry-renderer" tabindex="0" aria-disabled="false"><!--css-build:shady--><yt-icon class="guide-icon style-scope ytd-guide-entry-renderer" disable-upgrade=""></yt-icon><yt-img-shadow height="24" width="24" class="style-scope ytd-guide-entry-renderer" disable-upgrade=""></yt-img-shadow><yt-formatted-string class="title style-scope ytd-guide-entry-renderer"><!--css-build:shady--></yt-formatted-string><span class="guide-entry-count style-scope ytd-guide-entry-renderer"></span><yt-icon class="guide-entry-badge style-scope ytd-guide-entry-renderer" disable-upgrade=""></yt-icon><div id="newness-dot" class="style-scope ytd-guide-entry-renderer"></div></tp-yt-paper-item></a><yt-interaction class="style-scope ytd-guide-entry-renderer"><!--css-build:shady--><div class="stroke style-scope yt-interaction"></div><div class="fill style-scope yt-interaction"></div></yt-interaction></ytd-guide-entry-renderer>`;
  248. document.querySelector(`#items > ytd-guide-entry-renderer:nth-child(2)`).data = trendingData;
  249. var miniguidetemplate = `<ytd-mini-guide-entry-renderer class="style-scope ytd-mini-guide-section-renderer" is-primary="" line-end-style="none"><!--css-build:shady--><a id="endpoint" class="yt-simple-endpoint style-scope ytd-guide-entry-renderer" tabindex="-1" role="tablist"><tp-yt-paper-item role="tab" class="style-scope ytd-guide-entry-renderer" tabindex="0" aria-disabled="false"><!--css-build:shady--><yt-icon class="guide-icon style-scope ytd-guide-entry-renderer" disable-upgrade=""></yt-icon><yt-img-shadow height="24" width="24" class="style-scope ytd-guide-entry-renderer" disable-upgrade=""></yt-img-shadow><yt-formatted-string class="title style-scope ytd-guide-entry-renderer"><!--css-build:shady--></yt-formatted-string><span class="guide-entry-count style-scope ytd-guide-entry-renderer"></span><yt-icon class="guide-entry-badge style-scope ytd-guide-entry-renderer" disable-upgrade=""></yt-icon><div id="newness-dot" class="style-scope ytd-guide-entry-renderer"></div></tp-yt-paper-item></a><yt-interaction class="style-scope ytd-guide-entry-renderer"><!--css-build:shady--><div class="stroke style-scope yt-interaction"></div><div class="fill style-scope yt-interaction"></div></yt-interaction></ytd-guide-entry-renderer>`;
  250. document.querySelector(`#items > ytd-mini-guide-entry-renderer:nth-child(2)`).data = trendingData;
  251. }
  252. waitForElm("#items.ytd-guide-section-renderer").then((elm) => {
  253. restoreTrending();
  254. });
  255. waitForElm("#items.ytd-mini-guide-section-renderer").then((elm) => {
  256. restoreTrending();
  257. });
  258.  
  259. // Fix for like-dislike ratio
  260. function $(q) {
  261. return document.querySelector(q);
  262. }
  263. addEventListener('yt-page-data-updated', function() {
  264. if(!location.pathname.startsWith('/watch')) return;
  265. var lds = $('ytd-video-primary-info-renderer div#top-level-buttons-computed');
  266. var like = $('ytd-video-primary-info-renderer div#segmented-like-button > ytd-toggle-button-renderer');
  267. var share = $('ytd-video-primary-info-renderer div#top-level-buttons-computed > ytd-segmented-like-dislike-button-renderer + ytd-button-renderer');
  268. lds.insertBefore(like, share);
  269. like.setAttribute('class', like.getAttribute('class').replace('ytd-segmented-like-dislike-button-renderer', 'ytd-menu-renderer force-icon-button'));
  270. like.removeAttribute('is-paper-button-with-icon');
  271. like.removeAttribute('is-paper-button');
  272. like.setAttribute('style-action-button', '');
  273. like.setAttribute('is-icon-button', '');
  274. like.querySelector('a').insertBefore(like.querySelector('yt-formatted-string'), like.querySelector('tp-yt-paper-tooltip'));
  275. try { like.querySelector('paper-ripple').remove(); } catch(e) {}
  276. var paper = like.querySelector('tp-yt-paper-button');
  277. paper.removeAttribute('style-target');
  278. paper.removeAttribute('animated');
  279. paper.removeAttribute('elevation');
  280. like.querySelector('a').insertBefore(paper.querySelector('yt-icon'), like.querySelector('yt-formatted-string'));
  281. paper.outerHTML = paper.outerHTML.replace('<tp-yt-paper-button ', '<yt-icon-button ').replace('</tp-yt-paper-button>', '</yt-icon-button>');
  282. paper = like.querySelector('yt-icon-button');
  283. paper.querySelector('button#button').appendChild(like.querySelector('yt-icon'));
  284. var dislike = $('ytd-video-primary-info-renderer div#segmented-dislike-button > ytd-toggle-button-renderer');
  285. lds.insertBefore(dislike, share);
  286. $('ytd-video-primary-info-renderer ytd-segmented-like-dislike-button-renderer').remove();
  287. dislike.setAttribute('class', dislike.getAttribute('class').replace('ytd-segmented-like-dislike-button-renderer', 'ytd-menu-renderer force-icon-button'));
  288. dislike.removeAttribute('has-no-text');
  289. dislike.setAttribute('style-action-button', '');
  290. var dlabel = document.createElement('yt-formatted-stringx');
  291. dlabel.setAttribute('id', 'text');
  292. if(dislike.getAttribute('class').includes('style-default-active'))
  293. dlabel.setAttribute('class', dlabel.getAttribute('class').replace('style-default', 'style-default-active'));
  294. dislike.querySelector('a').insertBefore(dlabel, dislike.querySelector('tp-yt-paper-tooltip'));
  295. $('ytd-video-primary-info-renderer').removeAttribute('flex-menu-enabled');
  296. });
  297.  
  298. // Restore old comment replies UI
  299. var observingComments = false;
  300. var hl;
  301.  
  302. const cfconfig = {
  303. unicodeEmojis: false
  304. };
  305.  
  306. const cfi18n = {
  307. en: {
  308. viewSingular: "View reply",
  309. viewMulti: "View %s replies",
  310. viewSingularOwner: "View reply from %s",
  311. viewMultiOwner: "View %s replies from %s and others",
  312. hideSingular: "Hide reply",
  313. hideMulti: "Hide replies",
  314. replyCountIsolator: /( REPLIES)|( REPLY)/
  315. }
  316. }
  317.  
  318. /**
  319. * Get a string from the localization strings.
  320. *
  321. * @param {string} string Name of string to get
  322. * @param {string} hl Language to use.
  323. * @param {...array} args Strings.
  324. * @returns {string}
  325. */
  326. function getString(string, hl = "en", ...args) {
  327. if (!string) return;
  328. var str;
  329. if (cfi18n[hl]) {
  330. if (cfi18n[hl][string]) {
  331. str = cfi18n[hl][string];
  332. } else if (cfi18n.en[string]) {
  333. str = cfi18n.en[string];
  334. } else {
  335. return;
  336. }
  337. } else {
  338. if (cfi18n.en[string]) str = cfi18n.en[string];
  339. }
  340.  
  341. for (var i = 0; i < args.length; i++) {
  342. str = str.replace(/%s/, args[i]);
  343. }
  344.  
  345. return str;
  346. }
  347.  
  348. /**
  349. * Wait for a selector to exist
  350. *
  351. * @param {string} selector CSS Selector
  352. * @param {HTMLElement} base Element to search inside
  353. * @returns {Node}
  354. */
  355. async function waitForElm(selector, base = document) {
  356. if (!selector) return null;
  357. if (!base.querySelector) return null;
  358. while (base.querySelector(selector) == null) {
  359. await new Promise(r => requestAnimationFrame(r));
  360. };
  361. return base.querySelector(selector);
  362. };
  363.  
  364. /**
  365. * Is a value in an array?
  366. *
  367. * @param {*} needle Value to search
  368. * @param {Array} haystack Array to search
  369. * @returns {boolean}
  370. */
  371. function inArray(needle, haystack) {
  372. for (var i = 0; i < haystack.length; i++) {
  373. if (needle == haystack[i]) return true;
  374. }
  375. return false;
  376. }
  377.  
  378. /**
  379. * Get text of an InnerTube string.
  380. *
  381. * @param {object} object String container.
  382. */
  383. function getSimpleString(object) {
  384. if (object.simpleText) return object.simpleText;
  385.  
  386. var str = "";
  387. for (var i = 0; i < object.runs.length; i++) {
  388. str += object.runs[i].text;
  389. }
  390. return str;
  391. }
  392.  
  393. /**
  394. * Format a commentRenderer.
  395. *
  396. * @param {object} comment commentRenderer from InnerTube.
  397. */
  398. function formatComment(comment) {
  399. if (cfconfig.unicodeEmojis) {
  400. var runs;
  401. try {
  402. runs = comment.contentText.runs
  403. for (var i = 0; i < runs.length; i++) {
  404. delete runs[i].emoji;
  405. delete runs[i].loggingDirectives;
  406. }
  407. } catch(err) {}
  408. }
  409.  
  410. return comment;
  411. }
  412.  
  413. /**
  414. * Format a commentThreadRenderer.
  415. *
  416. * @param {object} thread commentThreadRenderer from InnerTube.
  417. */
  418. async function formatCommentThread(thread) {
  419. if (thread.comment.commentRenderer) {
  420. thread.comment.commentRenderer = formatComment(thread.comment.commentRenderer);
  421. }
  422.  
  423. var replies;
  424. try {
  425. replies = thread.replies.commentRepliesRenderer;
  426. if (replies.viewRepliesIcon) {
  427. replies.viewReplies.buttonRenderer.icon = replies.viewRepliesIcon.buttonRenderer.icon;
  428. delete replies.viewRepliesIcon;
  429. }
  430.  
  431. if (replies.hideRepliesIcon) {
  432. replies.hideReplies.buttonRenderer.icon = replies.hideRepliesIcon.buttonRenderer.icon;
  433. delete replies.hideRepliesIcon;
  434. }
  435.  
  436. var creatorName;
  437. try {
  438. creatorName = replies.viewRepliesCreatorThumbnail.accessibility.accessibilityData.label;
  439. delete replies.viewRepliesCreatorThumbnail;
  440. } catch(err) {}
  441.  
  442. var replyCount = getSimpleString(replies.viewReplies.buttonRenderer.text);
  443. replyCount = +replyCount.replace(getString("replyCountIsolator", hl), "");
  444.  
  445. var viewMultiString = creatorName ? "viewMultiOwner" : "viewMulti";
  446. var viewSingleString = creatorName ? "viewSingularOwner" : "viewSingular";
  447.  
  448. replies.viewReplies.buttonRenderer.text = {
  449. runs: [
  450. {
  451. text: (replyCount > 1) ? getString(viewMultiString, hl, replyCount, creatorName) : getString(viewSingleString, hl, creatorName)
  452. }
  453. ]
  454. }
  455.  
  456. replies.hideReplies.buttonRenderer.text = {
  457. runs: [
  458. {
  459. text: (replyCount > 1) ? getString("hideMulti", hl) : getString("hideSingular", hl)
  460. }
  461. ]
  462. };
  463. } catch(err) {}
  464.  
  465. return thread;
  466. }
  467.  
  468. /**
  469. * Force Polymer to refresh data of an element.
  470. *
  471. * @param {Node} element Element to refresh data of.
  472. */
  473. function refreshData(element) {
  474. var clone = element.cloneNode();
  475. clone.data = element.data;
  476. // Let the script know we left our mark
  477. // in a way that doesn't rely on classes
  478. // because Polymer likes to cast comments
  479. // into the void for later reuse
  480. clone.data.fixedByCF = true;
  481. for (var i in element.properties) {
  482. clone[i] = element[i];
  483. }
  484. element.insertAdjacentElement("afterend", clone);
  485. element.remove();
  486. }
  487.  
  488. var commentObserver = new MutationObserver((list) => {
  489. list.forEach(async (mutation) => {
  490. if (mutation.addedNodes) {
  491. for (var i = 0; i < mutation.addedNodes.length; i++) {
  492. var elm = mutation.addedNodes[i];
  493. if (elm.classList && elm.data && !elm.data.fixedByCF) {
  494. if (elm.tagName == "YTD-COMMENT-THREAD-RENDERER") {
  495. elm.data = await formatCommentThread(elm.data);
  496. refreshData(elm);
  497. } else if (elm.tagName == "YTD-COMMENT-RENDERER") {
  498. if (!elm.classList.contains("ytd-comment-thread-renderer")) {
  499. elm.data = formatComment(elm.data);
  500. refreshData(elm);
  501. }
  502. }
  503. }
  504. }
  505. }
  506. });
  507. });
  508.  
  509. document.addEventListener("yt-page-data-updated", async (e) => {
  510. hl = yt.config_.HL;
  511. commentObserver.observe(document.querySelector("ytd-app"), { childList: true, subtree: true });
  512. });
  513.  
  514. // CSS adjustments and UI fixes
  515. (function() {
  516. ApplyCSS();
  517. function ApplyCSS() {
  518. var styles = document.createElement("style");
  519. styles.innerHTML=`
  520. /* Disable rounded corners including inform news such as covid19 */
  521. #cinematics.ytd-watch-flexy {
  522. display: none !important;
  523. }
  524.  
  525. div#clarify-box.attached-message.style-scope.ytd-watch-flexy {
  526. margin-top: 0px !important;
  527. }
  528.  
  529. ytd-clarification-renderer.style-scope.ytd-item-section-renderer {
  530. border: 1px solid !important;
  531. border-color: #0000001a !important;
  532. border-radius: 0px !important;
  533. }
  534.  
  535. ytd-clarification-renderer.style-scope.ytd-watch-flexy {
  536. border: 1px solid !important;
  537. border-color: #0000001a !important;
  538. border-radius: 0px !important;
  539. }
  540.  
  541. yt-formatted-string.description.style-scope.ytd-clarification-renderer {
  542. font-size: 1.4rem !important;
  543. }
  544.  
  545. div.content-title.style-scope.ytd-clarification-renderer {
  546. padding-bottom: 4px !important;
  547. }
  548.  
  549. ytd-playlist-panel-renderer[modern-panels]:not([within-miniplayer]) #container.ytd-playlist-panel-renderer {
  550. border-radius: 0px !important;
  551. }
  552.  
  553. ytd-playlist-panel-renderer[modern-panels]:not([hide-header-text]) .title.ytd-playlist-panel-renderer {
  554. font-family: Roboto !important;
  555. font-size: 1.4rem !important;
  556. line-height: 2rem !important;
  557. font-weight: 500 !important;
  558. }
  559.  
  560. ytd-tvfilm-offer-module-renderer[modern-panels] {
  561. border-radius: 0px !important;
  562. }
  563.  
  564. ytd-tvfilm-offer-module-renderer[modern-panels] #header.ytd-tvfilm-offer-module-renderer {
  565. border-radius: 0px !important;
  566. font-family: Roboto !important;
  567. font-size: 1.6rem !important;
  568. line-height: 2.2rem !important;
  569. font-weight: 400 !important;
  570. }
  571.  
  572. ytd-donation-shelf-renderer.style-scope.ytd-watch-flexy {
  573. border-radius: 0px !important;
  574. }
  575.  
  576. ytd-donation-shelf-renderer[modern-panels] #header-text.ytd-donation-shelf-renderer {
  577. font-family: Roboto !important;
  578. font-size: 1.6rem !important;
  579. font-weight: 500 !important;
  580. }
  581.  
  582. /* Disable rounded corners under the player */
  583. .ytp-ad-player-overlay-flyout-cta-rounded {
  584. border-radius: 2px !important;
  585. }
  586.  
  587. .ytp-flyout-cta .ytp-flyout-cta-action-button.ytp-flyout-cta-action-button-rounded {
  588. border-radius: 2px !important;
  589. text-transform: uppercase !important;
  590. }
  591.  
  592. .ytp-ad-action-interstitial-action-button.ytp-ad-action-interstitial-action-button-rounded {
  593. border-radius: 2px !important;
  594. text-transform: uppercase !important;
  595. }
  596.  
  597. .ytp-settings-menu.ytp-rounded-menu, .ytp-screen-mode-menu.ytp-rounded-menu {
  598. border-radius: 2px !important;
  599. }
  600.  
  601. .ytp-videowall-still-round-medium .ytp-videowall-still-image {
  602. border-radius: 2px !important;
  603. }
  604.  
  605. .ytp-sb-subscribe.ytp-sb-rounded, .ytp-sb-unsubscribe.ytp-sb-rounded {
  606. border-radius: 2px !important;
  607. }
  608.  
  609. .branding-context-container-inner.ytp-rounded-branding-context {
  610. border-radius: 2px !important;
  611. }
  612.  
  613. .ytp-autonav-endscreen-upnext-button.ytp-autonav-endscreen-upnext-button-rounded {
  614. border-radius: 2px !important;
  615. }
  616.  
  617. .ytp-autonav-cancelled-mini-mode .ytp-autonav-endscreen-upnext-thumbnail.rounded-thumbnail, .countdown-running .ytp-autonav-endscreen-small-mode .ytp-autonav-endscreen-upnext-thumbnail.rounded-thumbnail {
  618. border-radius: 2px !important;
  619. }
  620.  
  621. .ytp-autonav-endscreen-upnext-thumbnail.rounded-thumbnail {
  622. border-radius: 2px !important;
  623. }
  624.  
  625. .ytp-ad-overlay-container.ytp-rounded-overlay-ad .ytp-ad-overlay-image img, .ytp-ad-overlay-container.ytp-rounded-overlay-ad .ytp-ad-text-overlay, .ytp-ad-overlay-container.ytp-rounded-overlay-ad .ytp-ad-enhanced-overlay {
  626. border-radius: 0px !important;
  627. }
  628.  
  629. .ytp-tooltip.ytp-rounded-tooltip.ytp-text-detail.ytp-preview .ytp-tooltip-bg {
  630. border-top-left-radius: 0px !important;
  631. border-bottom-left-radius: 0px !important;
  632. }
  633.  
  634. .ytp-tooltip.ytp-rounded-tooltip.ytp-text-detail.ytp-preview {
  635. border-radius: 0px !important;
  636. }
  637.  
  638. /* Subscribe button fix + including notification bell fixes */
  639. tp-yt-paper-button.style-scope.ytd-subscribe-button-renderer {
  640. display: flex !important;
  641. }
  642.  
  643. .yt-spec-button-shape-next--size-m {
  644. background-color: transparent !important;
  645. padding-left: 14px !important;
  646. padding-right: 2px !important;
  647. }
  648.  
  649. .yt-spec-button-shape-next--mono.yt-spec-button-shape-next--tonal {
  650. background-color: transparent !important;
  651. }
  652.  
  653. div.cbox.yt-spec-button-shape-next--button-text-content {
  654. display: none !important;
  655. }
  656.  
  657. div.yt-spec-button-shape-next__secondary-icon {
  658. display: none !important;
  659. }
  660.  
  661. /* Remove Shorts, Trending and Podcasts in the sidebar + fix for 3rd-party YouTube scripts */
  662. #endpoint.yt-simple-endpoint.ytd-guide-entry-renderer.style-scope[title="Shorts"] {
  663. display: none !important;
  664. }
  665.  
  666. #endpoint.yt-simple-endpoint.ytd-mini-guide-entry-renderer.style-scope[title="Shorts"] {
  667. display: none !important;
  668. }
  669.  
  670. #endpoint.yt-simple-endpoint.ytd-guide-entry-renderer.style-scope[title="Trending"] {
  671. display: none !important;
  672. }
  673.  
  674. #endpoint.yt-simple-endpoint.ytd-guide-entry-renderer.style-scope[title="Podcasts"] {
  675. display: none !important;
  676. }
  677.  
  678. .box {
  679. margin-top: -18px !important;
  680. left: 0px !important;
  681. }`
  682. document.head.appendChild(styles);
  683. }
  684. })();