YouTube Mobile for desktop Topic is solved

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
grey_rat
Moongazer
Moongazer
Posts: 14
Joined: 2020-09-18, 17:54

YouTube Mobile for desktop

Unread post by grey_rat » 2022-12-31, 12:34

YouTube Mobile for desktop https://addons.mozilla.org/ru/firefox/a ... r-desktop/
I want a PM version or a userscript. Please!

Desktop -> Mobile
https://m.youtube.com/?persist_app=1&app=m

User avatar
Kerebron
Moon lover
Moon lover
Posts: 82
Joined: 2016-12-04, 22:01

Re: YouTube Mobile for desktop

Unread post by Kerebron » 2022-12-31, 16:56

There is one already available on RealityRipple's site - MTube add-on.
https://realityripple.com/Software/XUL/muTube/

User avatar
grey_rat
Moongazer
Moongazer
Posts: 14
Joined: 2020-09-18, 17:54

Re: YouTube Mobile for desktop

Unread post by grey_rat » 2022-12-31, 18:00

"YouTube Mobile for desktop" changes player with scrolling and changing volume, and comments below the video.

User avatar
somdcomputerguy
Lunatic
Lunatic
Posts: 311
Joined: 2014-02-23, 17:25
Location: Greenbrier County, West Virginia
Contact:

Re: YouTube Mobile for desktop

Unread post by somdcomputerguy » 2022-12-31, 21:36

This add-on for Pale Moon will probably do what you want. Not right off the bat though. Note that this add-on is not aimed specifically at youtube, but more at URLs in general, hence its' name..

Pale Moon Add-ons - URL Rewriter - https://addons.palemoon.org/addon/url-rewriter/
:cool: -bruce /* somdcomputerguy.com */
'If you change the way you look at things, the things you look at change.'

User avatar
grey_rat
Moongazer
Moongazer
Posts: 14
Joined: 2020-09-18, 17:54

Re: YouTube Mobile for desktop

Unread post by grey_rat » 2023-01-01, 13:08

URL Rewriter or Redirector - do a redirect
"YouTube Mobile for desktop" changes the Youtube page itself
Attachments
fffff.jpg

User avatar
Kris_88
Lunatic
Lunatic
Posts: 427
Joined: 2021-01-26, 11:18

Re: YouTube Mobile for desktop

Unread post by Kris_88 » 2023-01-01, 22:06

grey_rat wrote:
2022-12-31, 12:34
I want a PM version or a userscript. Please!
something like this:

Code: Select all

// ==UserScript==
// @name        mytube
// @namespace   mytube1
// @include     https://m.youtube.com/watch*
// @run-at document-start
// @version     1
// @grant       none
// ==/UserScript==

(function () {

  window.addEventListener("visibilitychange", function(e) {
    e.stopPropagation();
  }, true);


  window.addEventListener('load', function(e) {
    var hd = document.querySelector('head');
    var st = document.createElement("style");
    st.innerHTML =
      '.ytp-autohide { cursor:auto !important; } ' +
      '#player-control-overlay { display:none !important; }';
    hd.appendChild(st);

    var p = document.querySelector('#player');
    p.addEventListener('mousemove', function (e) {
      var v = document.querySelector('video');
      if(v) v.controls = true;
    });
  });

})();

User avatar
Kris_88
Lunatic
Lunatic
Posts: 427
Joined: 2021-01-26, 11:18

Re: YouTube Mobile for desktop

Unread post by Kris_88 » 2023-01-02, 07:15

Here, a version with the original CSS from the add-on:

Code: Select all

// ==UserScript==
// @name        mytube
// @namespace   mytube1
// @include     https://m.youtube.com/*
// @run-at document-start
// @version     1
// @grant       none
// ==/UserScript==

(function () {

  window.addEventListener("visibilitychange", function(e) {
    e.stopPropagation();
  }, true);


  window.addEventListener('load', function(e) {

    var hd = document.querySelector('head');
    var st = document.createElement("style");
    st.innerHTML = css();
//      '.ytp-autohide { cursor:auto !important; } ' +
//      '#player-control-overlay { display:none !important; }';
    hd.appendChild(st);

    var p = document.querySelector('#player');
    if(p) p.addEventListener('mousemove', function (e) {
      var v = document.querySelector('video');
      if(v) v.controls = true;
    });

  });


  function css() {
    var str = 
      ' body { overflow-y: scroll !important; } ' +
      ' ytm-app { padding-bottom: 0 !important; } ' +
      ' #header-bar:not(.amsterdam-header-restyle) header,#header-bar.filled header { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; } ' +
      ' ytm-mobile-topbar-renderer { top: 0 !important;z-index: 3 !important; } ' +
      ' header:not([data-mode="searching"]) { background-color: unset !important; } ' +
      ' header[data-mode="watch"] #home-icon,header[data-mode="watch"] .mobile-topbar-header-content,.mobile-topbar-header-sign-in-button a { color: currentColor !important; } ' +
      ' .mobile-topbar-header-content.non-search-mode { margin-left: calc(48px * 3 + 12px) !important; } ' +
      ' ytm-pivot-bar-renderer { height: 47px !important; width: calc(48px * 3) !important; left: 43px !important; padding-left: 10px !important; top: 0 !important; z-index: 3 !important; justify-content: start !important; border-top-width: 0 !important; } ' +
      ' #header-bar.amsterdam-header-restyle + ytm-pivot-bar-renderer { background: transparent !important; } ' +
      ' #header-bar.amsterdam-header-restyle:not(.filled) + ytm-pivot-bar-renderer c3-icon { color: white !important; } ' +
      ' ytm-pivot-bar-renderer[aria-hidden="true"] { display: none !important; } ' +
      ' ytm-pivot-bar-item-renderer { flex: none !important; } ' +
      ' .pivot-bar-item-tab { padding: 12px !important; } ' +
      ' .pivot-bar-item-title, ytm-pivot-bar-item-renderer:first-child { display: none !important; } ' +
      ' #player-container-id { position: absolute !important; } ' +
      ' .ytp-autohide { cursor: auto !important; } ' +
      ' #player-control-overlay { visibility: hidden !important;pointer-events: auto !important; } ' +
      ' #player-container-id:hover .player-controls-top { visibility: visible !important; } ' +
      ' .player-controls-top { background-color: rgba(0,0,0,0.6) !important; } ' +
      ' .player-settings-icon { padding: 3px !important; } ' +
      ' .player-settings-icon > c3-icon { width: 38px !important;height: 38px !important; } ' +
      ' .player-controls-bottom, .player-controls-pb,#player-control-container:not(.ended-mode) .player-controls-middle,#player-control-container:not(.ended-mode) .player-controls-background-container,#movie_player.unstarted-mode .ytp-caption-window-container { display: none !important; } ' +
      ' #player-container-id:hover .ytp-caption-window-container { top: -40px !important; } ' +
      ' #movie_player.playing-mode:not(.unstarted-mode) .html5-video-container,#movie_player.paused-mode:not(.unstarted-mode) .html5-video-container { width: 100% !important;height: 100% !important; } ' +
      ' #movie_player.playing-mode:not(.unstarted-mode) .html5-main-video,#movie_player.paused-mode:not(.unstarted-mode) .html5-main-video { width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; object-fit: contain !important; } ' +
      ' .unstarted-mode .ytp-cued-thumbnail-overlay:not([aria-hidden="true"]) { cursor: pointer !important; } ' +
      ' ytm-watch { display: flex !important;flex-flow: column !important; } ' +
      ' .player-placeholder { padding-bottom: 0 !important; } ' +
      ' .player-placeholder::before { content: "" !important;display: block !important; padding-bottom: 56.25% !important; } ' +
      ' @media (min-width:931px) and (orientation:landscape) { ' +
      '  ytm-engagement-panel { order: 1 !important;position: static !important;display: block !important; width: auto !important; margin-right: 256px !important; } ' +
      '  ytm-engagement-panel:not(:last-of-type) { display: none !important; } ' +
      '  ytm-engagement-panel-section-list-renderer,.engagement-panel-section-list-background,.engagement-panel-container {  background-color: transparent !important; } } ' +
      ' @media (min-width:1280px) and (orientation:landscape) { ytm-engagement-panel { margin-right: 500px !important; } } ' +
      ' ytm-section-list-renderer, ytm-structured-description-content-renderer { overflow-y: auto !important; } ' +
      ' ytm-video-description-header-renderer > .title, ytm-video-description-header-renderer > .cbox, .engagement-panel-drag-line { display: none !important; } ' +
      ' .engagement-panel-section-list-header-wrapper { padding-top: 0 !important; } ' +
      ' .comment-text { user-select: text !important; } ' +
      ' .scbrr-tabs { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; } ' +
      ' select.select { padding: 8px 24px 8px 0 !important; } ' +
      ' .select-icon { height: 32px !important; } ' +
      ' .scrollable-tab-header-container { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; overflow: auto !important; margin-bottom: 12px !important; } ' +
      ' .scrollable-tab[aria-selected="true"], .scbrr-tab[aria-selected="true"] { border-bottom-color: red !important; } ' +
      ' .scrollable-tab, ytm-pivot-bar-item-renderer, .ytm-sort-filter-sub-menu-item { cursor: pointer !important; } ' +
      ' .horizontal-card-list-cards { overflow-x: auto !important; } ' +
      ' ytm-sign-in-promo-with-background-renderer ytm-promo { min-height: calc(100vh - 48px) !important; } ' +
      ' ytm-promoted-sparkles-text-search-renderer,ytm-promoted-sparkles-web-renderer,ytm-promoted-video-renderer,ytm-watch-metadata-app-promo-renderer,ytm-companion-ad-renderer,ytm-clarification-renderer,.interactive-tabbed-header-banner-overlay,.ytp-paid-content-overlay,.mealbar-promo-renderer,ytm-info-panel-container-renderer { display: none !important; } ';
    return(str);
  };

})();

Additionally, you can set useragent override in about:config :
general.useragent.override.youtube.com = Android 12

User avatar
Kris_88
Lunatic
Lunatic
Posts: 427
Joined: 2021-01-26, 11:18

Re: YouTube Mobile for desktop

Unread post by Kris_88 » 2023-01-02, 09:10

I played a little with this script. Indeed, a good solution for YouTube.
grey_rat, thank you.

User avatar
grey_rat
Moongazer
Moongazer
Posts: 14
Joined: 2020-09-18, 17:54

Re: YouTube Mobile for desktop

Unread post by grey_rat » 2023-01-02, 17:59

Kris_88, thank. Script work!
Script in my dropbox https://dl.dropboxusercontent.com/s/g4k ... tb.user.js

User avatar
Kris_88
Lunatic
Lunatic
Posts: 427
Joined: 2021-01-26, 11:18

Re: YouTube Mobile for desktop

Unread post by Kris_88 » 2023-01-02, 18:36

OK!

User avatar
sidology
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2021-12-04, 22:07

Re: YouTube Mobile for desktop

Unread post by sidology » 2023-01-02, 22:30

Kris_88 wrote:
2023-01-02, 09:10
I played a little with this script. Indeed, a good solution for YouTube.
Is there a way to block right mouse click behaving like left click?
I have PermissionsPlus installed and I have set "Context menu manipulation" to block, but it's not stoping youtube to process right click as left click (not extension fault). I really need my context menu.

User avatar
Kris_88
Lunatic
Lunatic
Posts: 427
Joined: 2021-01-26, 11:18

Re: YouTube Mobile for desktop

Unread post by Kris_88 » 2023-01-03, 09:51

sidology wrote:
2023-01-02, 22:30
Is there a way to block right mouse click behaving like left click?
I will look, a little later ...

User avatar
Kris_88
Lunatic
Lunatic
Posts: 427
Joined: 2021-01-26, 11:18

Re: YouTube Mobile for desktop

Unread post by Kris_88 » 2023-01-04, 21:59

sidology wrote:
2023-01-02, 22:30
Is there a way to block right mouse click behaving like left click?
...
I really need my context menu.
Done.

Code: Select all

// ==UserScript==
// @name        mytube
// @namespace   mytube1
// @include     https://m.youtube.com/*
// @run-at document-start
// @version     1
// @grant       none
// ==/UserScript==

(function () {

  window.addEventListener("visibilitychange", function(e) {
    e.stopPropagation();
  }, true);


  window.addEventListener("click", function(e) {
    if(e.button != 0) e.stopImmediatePropagation();
  }, true);


  window.addEventListener('load', function(e) {

    var hd = document.querySelector('head');
    var st = document.createElement("style");
    st.innerHTML = css();
//      '.ytp-autohide { cursor:auto !important; } ' +
//      '#player-control-overlay { display:none !important; }';
    hd.appendChild(st);

    var p = document.querySelector('#player');
    if(p) p.addEventListener('mousemove', function (e) {
      var v = document.querySelector('video');
      if(v) v.controls = true;
    });

  });


  function css() {
    var str = 
      ' body { overflow-y: scroll !important; } ' +
      ' ytm-app { padding-bottom: 0 !important; } ' +
      ' #header-bar:not(.amsterdam-header-restyle) header,#header-bar.filled header { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; } ' +
      ' ytm-mobile-topbar-renderer { top: 0 !important;z-index: 3 !important; } ' +
      ' header:not([data-mode="searching"]) { background-color: unset !important; } ' +
      ' header[data-mode="watch"] #home-icon,header[data-mode="watch"] .mobile-topbar-header-content,.mobile-topbar-header-sign-in-button a { color: currentColor !important; } ' +
      ' .mobile-topbar-header-content.non-search-mode { margin-left: calc(48px * 3 + 12px) !important; } ' +
      ' ytm-pivot-bar-renderer { height: 47px !important; width: calc(48px * 3) !important; left: 43px !important; padding-left: 10px !important; top: 0 !important; z-index: 3 !important; justify-content: start !important; border-top-width: 0 !important; } ' +
      ' #header-bar.amsterdam-header-restyle + ytm-pivot-bar-renderer { background: transparent !important; } ' +
      ' #header-bar.amsterdam-header-restyle:not(.filled) + ytm-pivot-bar-renderer c3-icon { color: white !important; } ' +
      ' ytm-pivot-bar-renderer[aria-hidden="true"] { display: none !important; } ' +
      ' ytm-pivot-bar-item-renderer { flex: none !important; } ' +
      ' .pivot-bar-item-tab { padding: 12px !important; } ' +
      ' .pivot-bar-item-title, ytm-pivot-bar-item-renderer:first-child { display: none !important; } ' +
      ' #player-container-id { position: absolute !important; } ' +
      ' .ytp-autohide { cursor: auto !important; } ' +
      ' #player-control-overlay { visibility: hidden !important;pointer-events: auto !important; } ' +
      ' #player-container-id:hover .player-controls-top { visibility: visible !important; } ' +
      ' .player-controls-top { background-color: rgba(0,0,0,0.6) !important; } ' +
      ' .player-settings-icon { padding: 3px !important; } ' +
      ' .player-settings-icon > c3-icon { width: 38px !important;height: 38px !important; } ' +
      ' .player-controls-bottom, .player-controls-pb,#player-control-container:not(.ended-mode) .player-controls-middle,#player-control-container:not(.ended-mode) .player-controls-background-container,#movie_player.unstarted-mode .ytp-caption-window-container { display: none !important; } ' +
      ' #player-container-id:hover .ytp-caption-window-container { top: -40px !important; } ' +
      ' #movie_player.playing-mode:not(.unstarted-mode) .html5-video-container,#movie_player.paused-mode:not(.unstarted-mode) .html5-video-container { width: 100% !important;height: 100% !important; } ' +
      ' #movie_player.playing-mode:not(.unstarted-mode) .html5-main-video,#movie_player.paused-mode:not(.unstarted-mode) .html5-main-video { width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; object-fit: contain !important; } ' +
      ' .unstarted-mode .ytp-cued-thumbnail-overlay:not([aria-hidden="true"]) { cursor: pointer !important; } ' +
      ' ytm-watch { display: flex !important;flex-flow: column !important; } ' +
      ' .player-placeholder { padding-bottom: 0 !important; } ' +
      ' .player-placeholder::before { content: "" !important;display: block !important; padding-bottom: 56.25% !important; } ' +
      ' @media (min-width:931px) and (orientation:landscape) { ' +
      '  ytm-engagement-panel { order: 1 !important;position: static !important;display: block !important; width: auto !important; margin-right: 256px !important; } ' +
      '  ytm-engagement-panel:not(:last-of-type) { display: none !important; } ' +
      '  ytm-engagement-panel-section-list-renderer,.engagement-panel-section-list-background,.engagement-panel-container {  background-color: transparent !important; } } ' +
      ' @media (min-width:1280px) and (orientation:landscape) { ytm-engagement-panel { margin-right: 500px !important; } } ' +
      ' ytm-section-list-renderer, ytm-structured-description-content-renderer { overflow-y: auto !important; } ' +
      ' ytm-video-description-header-renderer > .title, ytm-video-description-header-renderer > .cbox, .engagement-panel-drag-line { display: none !important; } ' +
      ' .engagement-panel-section-list-header-wrapper { padding-top: 0 !important; } ' +
      ' .comment-text { user-select: text !important; } ' +
      ' .scbrr-tabs { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; } ' +
      ' select.select { padding: 8px 24px 8px 0 !important; } ' +
      ' .select-icon { height: 32px !important; } ' +
      ' .scrollable-tab-header-container { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; overflow: auto !important; margin-bottom: 12px !important; } ' +
      ' .scrollable-tab[aria-selected="true"], .scbrr-tab[aria-selected="true"] { border-bottom-color: red !important; } ' +
      ' .scrollable-tab, ytm-pivot-bar-item-renderer, .ytm-sort-filter-sub-menu-item { cursor: pointer !important; } ' +
      ' .horizontal-card-list-cards { overflow-x: auto !important; } ' +
      ' ytm-sign-in-promo-with-background-renderer ytm-promo { min-height: calc(100vh - 48px) !important; } ' +
      ' ytm-promoted-sparkles-text-search-renderer,ytm-promoted-sparkles-web-renderer,ytm-promoted-video-renderer,ytm-watch-metadata-app-promo-renderer,ytm-companion-ad-renderer,ytm-clarification-renderer,.interactive-tabbed-header-banner-overlay,.ytp-paid-content-overlay,.mealbar-promo-renderer,ytm-info-panel-container-renderer { display: none !important; } ';
    return(str);
  };

})();


User avatar
sidology
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2021-12-04, 22:07

Re: YouTube Mobile for desktop

Unread post by sidology » 2023-01-04, 22:27

Great, now is as desktop expected. Thank you very much.

User avatar
Kris_88
Lunatic
Lunatic
Posts: 427
Joined: 2021-01-26, 11:18

Re: YouTube Mobile for desktop

Unread post by Kris_88 » 2023-01-05, 14:11

SeekBar improved.

Code: Select all

// ==UserScript==
// @name        mytube
// @namespace   mytube1
// @include     https://m.youtube.com/*
// @run-at document-start
// @version     1
// @grant       none
// ==/UserScript==

(function () {

  window.addEventListener("visibilitychange", function(e) {
    e.stopPropagation();
  }, true);


  window.addEventListener("click", function(e) {
    if(e.button != 0) e.stopImmediatePropagation();
  }, true);


  window.addEventListener('load', function(e) {

    var hd = document.querySelector('head');
    var st = document.createElement("style");
    st.innerHTML = css();
//      '.ytp-autohide { cursor:auto !important; } ' +
//      '#player-control-overlay { display:none !important; }';
    hd.appendChild(st);

    var p = document.querySelector('#player');
    if(p) p.addEventListener('mousemove', function (e) {
      var v = document.querySelector('video');
      if(v && !v.__frzctrls) {

        v.addEventListener("click", function(e) {
          e.stopImmediatePropagation();
        }, true);

        v.controls = true;
        Object.defineProperty(v, 'controls', {writable: false});

        v.__frzctrls = true;
      };
    });

  });


  function css() {
    var str = 
      ' body { overflow-y: scroll !important; } ' +
      ' ytm-app { padding-bottom: 0 !important; } ' +
      ' #header-bar:not(.amsterdam-header-restyle) header,#header-bar.filled header { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; } ' +
      ' ytm-mobile-topbar-renderer { top: 0 !important;z-index: 3 !important; } ' +
      ' header:not([data-mode="searching"]) { background-color: unset !important; } ' +
      ' header[data-mode="watch"] #home-icon,header[data-mode="watch"] .mobile-topbar-header-content,.mobile-topbar-header-sign-in-button a { color: currentColor !important; } ' +
      ' .mobile-topbar-header-content.non-search-mode { margin-left: calc(48px * 3 + 12px) !important; } ' +
      ' ytm-pivot-bar-renderer { height: 47px !important; width: calc(48px * 3) !important; left: 43px !important; padding-left: 10px !important; top: 0 !important; z-index: 3 !important; justify-content: start !important; border-top-width: 0 !important; } ' +
      ' #header-bar.amsterdam-header-restyle + ytm-pivot-bar-renderer { background: transparent !important; } ' +
      ' #header-bar.amsterdam-header-restyle:not(.filled) + ytm-pivot-bar-renderer c3-icon { color: white !important; } ' +
      ' ytm-pivot-bar-renderer[aria-hidden="true"] { display: none !important; } ' +
      ' ytm-pivot-bar-item-renderer { flex: none !important; } ' +
      ' .pivot-bar-item-tab { padding: 12px !important; } ' +
      ' .pivot-bar-item-title, ytm-pivot-bar-item-renderer:first-child { display: none !important; } ' +
      ' #player-container-id { position: absolute !important; } ' +
      ' .ytp-autohide { cursor: auto !important; } ' +
      ' #player-control-overlay { visibility: hidden !important;pointer-events: auto !important; } ' +
      ' #player-container-id:hover .player-controls-top { visibility: visible !important; } ' +
      ' .player-controls-top { background-color: rgba(0,0,0,0.6) !important; } ' +
      ' .player-settings-icon { padding: 3px !important; } ' +
      ' .player-settings-icon > c3-icon { width: 38px !important;height: 38px !important; } ' +
      ' .player-controls-bottom, .player-controls-pb,#player-control-container:not(.ended-mode) .player-controls-middle,#player-control-container:not(.ended-mode) .player-controls-background-container,#movie_player.unstarted-mode .ytp-caption-window-container { display: none !important; } ' +
      ' #player-container-id:hover .ytp-caption-window-container { top: -40px !important; } ' +
      ' #movie_player.playing-mode:not(.unstarted-mode) .html5-video-container,#movie_player.paused-mode:not(.unstarted-mode) .html5-video-container { width: 100% !important;height: 100% !important; } ' +
      ' #movie_player.playing-mode:not(.unstarted-mode) .html5-main-video,#movie_player.paused-mode:not(.unstarted-mode) .html5-main-video { width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; object-fit: contain !important; } ' +
      ' .unstarted-mode .ytp-cued-thumbnail-overlay:not([aria-hidden="true"]) { cursor: pointer !important; } ' +
      ' ytm-watch { display: flex !important;flex-flow: column !important; } ' +
      ' .player-placeholder { padding-bottom: 0 !important; } ' +
      ' .player-placeholder::before { content: "" !important;display: block !important; padding-bottom: 56.25% !important; } ' +
      ' @media (min-width:931px) and (orientation:landscape) { ' +
      '  ytm-engagement-panel { order: 1 !important;position: static !important;display: block !important; width: auto !important; margin-right: 256px !important; } ' +
      '  ytm-engagement-panel:not(:last-of-type) { display: none !important; } ' +
      '  ytm-engagement-panel-section-list-renderer,.engagement-panel-section-list-background,.engagement-panel-container {  background-color: transparent !important; } } ' +
      ' @media (min-width:1280px) and (orientation:landscape) { ytm-engagement-panel { margin-right: 500px !important; } } ' +
      ' ytm-section-list-renderer, ytm-structured-description-content-renderer { overflow-y: auto !important; } ' +
      ' ytm-video-description-header-renderer > .title, ytm-video-description-header-renderer > .cbox, .engagement-panel-drag-line { display: none !important; } ' +
      ' .engagement-panel-section-list-header-wrapper { padding-top: 0 !important; } ' +
      ' .comment-text { user-select: text !important; } ' +
      ' .scbrr-tabs { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; } ' +
      ' select.select { padding: 8px 24px 8px 0 !important; } ' +
      ' .select-icon { height: 32px !important; } ' +
      ' .scrollable-tab-header-container { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; overflow: auto !important; margin-bottom: 12px !important; } ' +
      ' .scrollable-tab[aria-selected="true"], .scbrr-tab[aria-selected="true"] { border-bottom-color: red !important; } ' +
      ' .scrollable-tab, ytm-pivot-bar-item-renderer, .ytm-sort-filter-sub-menu-item { cursor: pointer !important; } ' +
      ' .horizontal-card-list-cards { overflow-x: auto !important; } ' +
      ' ytm-sign-in-promo-with-background-renderer ytm-promo { min-height: calc(100vh - 48px) !important; } ' +
      ' ytm-promoted-sparkles-text-search-renderer,ytm-promoted-sparkles-web-renderer,ytm-promoted-video-renderer,ytm-watch-metadata-app-promo-renderer,ytm-companion-ad-renderer,ytm-clarification-renderer,.interactive-tabbed-header-banner-overlay,.ytp-paid-content-overlay,.mealbar-promo-renderer,ytm-info-panel-container-renderer { display: none !important; } ';
    return(str);
  };

})();


User avatar
sidology
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2021-12-04, 22:07

Re: YouTube Mobile for desktop

Unread post by sidology » 2023-01-05, 14:52

Much better, thanks again.

User avatar
grey_rat
Moongazer
Moongazer
Posts: 14
Joined: 2020-09-18, 17:54

Re: YouTube Mobile for desktop

Unread post by grey_rat » 2023-01-05, 21:33

For old CPU in ublock "My filters" it is desirable to add
m.youtube.com##.spinner:style(animation: none !important)
rotation spinner load CPU always

For very very old CPU it is possible to use an additional ViewTube script and VLC plugin http://sebaro.pro/viewtube/
https://m.youtube.com/watch?v=qhltXEaJHmU

User avatar
Kris_88
Lunatic
Lunatic
Posts: 427
Joined: 2021-01-26, 11:18

Re: YouTube Mobile for desktop

Unread post by Kris_88 » 2023-01-05, 21:48

grey_rat wrote:
2023-01-05, 21:33
For old CPU in ublock "My filters" it is desirable to add
m.youtube.com##.spinner:style(animation: none !important)
rotation spinner load CPU always
It can be added to css :

Code: Select all

// ==UserScript==
// @name        mytube
// @namespace   mytube1
// @include     https://m.youtube.com/*
// @run-at document-start
// @version     1
// @grant       none
// ==/UserScript==

(function () {

  window.addEventListener("visibilitychange", function(e) {
    e.stopPropagation();
  }, true);


  window.addEventListener("click", function(e) {
    if(e.button != 0) e.stopImmediatePropagation();
  }, true);


  window.addEventListener('load', function(e) {

    var hd = document.querySelector('head');
    var st = document.createElement("style");
    st.innerHTML = css();
//      '.ytp-autohide { cursor:auto !important; } ' +
//      '#player-control-overlay { display:none !important; }';
    hd.appendChild(st);

    var lastV = null;
    var p = document.querySelector('#player');
    if(p) p.addEventListener('mousemove', function (e) {
      var v = document.querySelector('video');
      if(v && v != lastV) {

        v.addEventListener("click", function(e) {
          e.stopImmediatePropagation();
        }, true);

        v.controls = true;
        Object.defineProperty(v, 'controls', {writable: false});

        v.volume = 0.1;

        lastV = v;
      };
    });

  });


  function css() {
    var str = 
      ' body { overflow-y: scroll !important; } ' +
      ' ytm-app { padding-bottom: 0 !important; } ' +
      ' #header-bar:not(.amsterdam-header-restyle) header,#header-bar.filled header { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; } ' +
      ' ytm-mobile-topbar-renderer { top: 0 !important;z-index: 3 !important; } ' +
      ' header:not([data-mode="searching"]) { background-color: unset !important; } ' +
      ' header[data-mode="watch"] #home-icon,header[data-mode="watch"] .mobile-topbar-header-content,.mobile-topbar-header-sign-in-button a { color: currentColor !important; } ' +
      ' .mobile-topbar-header-content.non-search-mode { margin-left: calc(48px * 3 + 12px) !important; } ' +
      ' ytm-pivot-bar-renderer { height: 47px !important; width: calc(48px * 3) !important; left: 43px !important; padding-left: 10px !important; top: 0 !important; z-index: 3 !important; justify-content: start !important; border-top-width: 0 !important; } ' +
      ' #header-bar.amsterdam-header-restyle + ytm-pivot-bar-renderer { background: transparent !important; } ' +
      ' #header-bar.amsterdam-header-restyle:not(.filled) + ytm-pivot-bar-renderer c3-icon { color: white !important; } ' +
      ' ytm-pivot-bar-renderer[aria-hidden="true"] { display: none !important; } ' +
      ' ytm-pivot-bar-item-renderer { flex: none !important; } ' +
      ' .pivot-bar-item-tab { padding: 12px !important; } ' +
      ' .pivot-bar-item-title, ytm-pivot-bar-item-renderer:first-child { display: none !important; } ' +
      ' #player-container-id { position: absolute !important; } ' +
      ' .ytp-autohide { cursor: auto !important; } ' +
      ' #player-control-overlay { visibility: hidden !important;pointer-events: auto !important; } ' +
      ' #player-container-id:hover .player-controls-top { visibility: visible !important; } ' +
      ' .player-controls-top { background-color: rgba(0,0,0,0.6) !important; } ' +
      ' .player-settings-icon { padding: 3px !important; } ' +
      ' .player-settings-icon > c3-icon { width: 38px !important;height: 38px !important; } ' +
      ' .player-controls-bottom, .player-controls-pb,#player-control-container:not(.ended-mode) .player-controls-middle,#player-control-container:not(.ended-mode) .player-controls-background-container,#movie_player.unstarted-mode .ytp-caption-window-container { display: none !important; } ' +
      ' #player-container-id:hover .ytp-caption-window-container { top: -40px !important; } ' +
      ' #movie_player.playing-mode:not(.unstarted-mode) .html5-video-container,#movie_player.paused-mode:not(.unstarted-mode) .html5-video-container { width: 100% !important;height: 100% !important; } ' +
      ' #movie_player.playing-mode:not(.unstarted-mode) .html5-main-video,#movie_player.paused-mode:not(.unstarted-mode) .html5-main-video { width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; object-fit: contain !important; } ' +
      ' .unstarted-mode .ytp-cued-thumbnail-overlay:not([aria-hidden="true"]) { cursor: pointer !important; } ' +
      ' ytm-watch { display: flex !important;flex-flow: column !important; } ' +
      ' .player-placeholder { padding-bottom: 0 !important; } ' +
      ' .player-placeholder::before { content: "" !important;display: block !important; padding-bottom: 56.25% !important; } ' +
      ' @media (min-width:931px) and (orientation:landscape) { ' +
      '  ytm-engagement-panel { order: 1 !important;position: static !important;display: block !important; width: auto !important; margin-right: 256px !important; } ' +
      '  ytm-engagement-panel:not(:last-of-type) { display: none !important; } ' +
      '  ytm-engagement-panel-section-list-renderer,.engagement-panel-section-list-background,.engagement-panel-container {  background-color: transparent !important; } } ' +
      ' @media (min-width:1280px) and (orientation:landscape) { ytm-engagement-panel { margin-right: 500px !important; } } ' +
      ' ytm-section-list-renderer, ytm-structured-description-content-renderer { overflow-y: auto !important; } ' +
      ' ytm-video-description-header-renderer > .title, ytm-video-description-header-renderer > .cbox, .engagement-panel-drag-line { display: none !important; } ' +
      ' .engagement-panel-section-list-header-wrapper { padding-top: 0 !important; } ' +
      ' .comment-text { user-select: text !important; } ' +
      ' .scbrr-tabs { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; } ' +
      ' select.select { padding: 8px 24px 8px 0 !important; } ' +
      ' .select-icon { height: 32px !important; } ' +
      ' .scrollable-tab-header-container { box-shadow: inset 0 -1px rgba(50%, 50%, 50%, 0.5) !important; overflow: auto !important; margin-bottom: 12px !important; } ' +
      ' .scrollable-tab[aria-selected="true"], .scbrr-tab[aria-selected="true"] { border-bottom-color: red !important; } ' +
      ' .scrollable-tab, ytm-pivot-bar-item-renderer, .ytm-sort-filter-sub-menu-item { cursor: pointer !important; } ' +
      ' .horizontal-card-list-cards { overflow-x: auto !important; } ' +
      ' ytm-sign-in-promo-with-background-renderer ytm-promo { min-height: calc(100vh - 48px) !important; } ' +
      ' ytm-promoted-sparkles-text-search-renderer,ytm-promoted-sparkles-web-renderer,ytm-promoted-video-renderer,ytm-watch-metadata-app-promo-renderer,ytm-companion-ad-renderer,ytm-clarification-renderer,.interactive-tabbed-header-banner-overlay,.ytp-paid-content-overlay,.mealbar-promo-renderer,ytm-info-panel-container-renderer { display: none !important; } ' +
      '    ytm-playlist-panel-video-renderer.item[selected="true"] a.compact-media-item-metadata-content { background-color: #b06070 !important; } ' +
      '    .spinner { animation: none !important; } ' ;


    return(str);
  };

})();


User avatar
grey_rat
Moongazer
Moongazer
Posts: 14
Joined: 2020-09-18, 17:54

Re: YouTube Mobile for desktop

Unread post by grey_rat » 2023-01-06, 14:57

Kris_88, thanks

Post Reply