User agent override for Youtube

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Samson

User agent override for Youtube

Unread post by Samson » 2019-05-11, 19:04

I'd like to suggest an update to the about:config useragent override currently being used for Youtube.

Currently it is set to this:

Code: Select all

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 PaleMoon/28.5.0
This does not allow for the use of the dark theme on the site though so I'd like to suggest updating it to this instead:

Code: Select all

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0 PaleMoon/28.5.0
That will let you use the dark theme. Unfortunately any agent using a Gecko or Firefox version >= 63 causes all of the video preview spaces to load blank so it can't go any higher than that because of silly Google and their aggressive useragent sniffing.

New Tobin Paradigm

Re: User agent override for Youtube

Unread post by New Tobin Paradigm » 2019-05-11, 19:18

Feel free to change it yourself but not likely gonna happen.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35634
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: User agent override for Youtube

Unread post by Moonchild » 2019-05-11, 20:27

Our UAO is set to 42 for a reason, namely the use of the previous UI iteration of YouTube that doesn't use Chome-focused code (which is slow and CPU intensive on anything else)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Samson

Re: User agent override for Youtube

Unread post by Samson » 2019-05-12, 03:41

I have changed it myself. I just figured it would be nice to update it for everyone else too. Bummer that it causes slowdowns for some people. I'm not getting that myself.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35634
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: User agent override for Youtube

Unread post by Moonchild » 2019-05-12, 11:25

Samson wrote:
2019-05-12, 03:41
Bummer that it causes slowdowns for some people.
Not just some. Everyone not on chrome/chromium based browsers.
Details in this thread.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5173
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: User agent override for Youtube

Unread post by Night Wing » 2019-05-12, 13:39

Samson wrote:
2019-05-12, 03:41
I have changed it myself. Bummer that it causes slowdowns for some people. I'm not getting that myself.
I use the new YouTube interface to get the default Dark Theme in YT so I changed to a different user agent than what comes with default Pale Moon. I get the same results as you do. No slowdowns for me and this is with using a 2010 year model HP desktop tower computer with an Intel i7 processor, 2.80 processor speed with 16 GB of memory.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: User agent override for Youtube

Unread post by coffeebreak » 2019-05-12, 15:44

Samson wrote:
2019-05-12, 03:41
Bummer that it causes slowdowns for some people.
Moonchild wrote:
2019-05-12, 11:25
Not just some. Everyone not on chrome/chromium based browsers.
Night Wing wrote:
2019-05-12, 13:39
No slowdowns for me
No, not everyone is affected, but a number of people are. Hardware seems to matter.

I have a problem using the new design. I find it excruciatingly slow with CPU usage that fluctuates between around 30-70%.

When the new design was rolled out in Sept 2017, the UA override was initially changed to have PM use the new design. This produced feedback from people who had problems using it, and after some examination the UA override was changed back. The discussions can be found/read by searching the forum for: youtube new design

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35634
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: User agent override for Youtube

Unread post by Moonchild » 2019-05-12, 16:52

If you are on an i7, Ryzen, or other "enthusiast" CPU, you'll likely not notice. but that's not what most people are running, and there were clear complaints about it. Do a forum search.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

ibmhal5678

Re: User agent override for Youtube

Unread post by ibmhal5678 » 2019-05-22, 10:24

Hi all,

I'd like to have either a builtin function or an add-on, which would add "&disable_polymer=true" to every youtube url. This enforces the use of the old youtube design. It usually helps, if youtube is unbearably slow for you. Maybe youtube will eventually remove the old design completely from their web site, years ago such a step was announced, but so far nothing has happened.

There are add-ons like "youtube classic" or "Disable Polymer on YouTube" for FF, but unfortunately they are all webext now, and I can't find an old version anymore, that would work with Pale Moon or SeaMonkey. If I knew how to develop such an add-on, I'd do it myself.

kind regards,

New Tobin Paradigm

Re: User agent override for Youtube

Unread post by New Tobin Paradigm » 2019-05-22, 14:56

Use the javascript scratchpad to set a cookie set it expire in the year 9999. The Internet will tell you the code.

You can also do it to always have the wide version on the older layout.

cookies.png

As an aside, I have a Ryzon system and new youtube still runs like shit, even in chrome.

User avatar
R3n_001
Moonbather
Moonbather
Posts: 66
Joined: 2019-05-25, 20:39
Contact:

Re: User agent override for Youtube

Unread post by R3n_001 » 2019-05-25, 20:44

ibmhal5678 wrote:
2019-05-22, 10:24
Hi all,

I'd like to have either a builtin function or an add-on, which would add "&disable_polymer=true" to every youtube url. This enforces the use of the old youtube design. It usually helps, if youtube is unbearably slow for you. Maybe youtube will eventually remove the old design completely from their web site, years ago such a step was announced, but so far nothing has happened.

There are add-ons like "youtube classic" or "Disable Polymer on YouTube" for FF, but unfortunately they are all webext now, and I can't find an old version anymore, that would work with Pale Moon or SeaMonkey. If I knew how to develop such an add-on, I'd do it myself.

kind regards,
Pale Moon's user agent already forces YouTube to run in disable_polymer mode, you can use Pale Moon's user agent to disable polymer in other browsers without an extension

This is the user agent I use "Mozilla/5.0 (X11; Linux x86_64; rv:60.9) Gecko/20100101 Goanna/4.2 Firefox/60.9 PaleMoon/28.5.0"

Also you can get a dark mode on the old design with this user.css theme https://awau.moe/6XapUff.css

Locked