YouTube - Non-Rounded Design

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

La data de 08-02-2023. Vezi ultima versiune.

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