General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Force youtube mobile site on desktop
Posted by: Mello
Date: November 08, 2018 01:20AM

By using m.youtube I can get to the site but as soon as I select
a video to play only www.youtube version opens. I'm using a mobile
useragent and have doublechecked it is working at https://www.whatsmyua.info/

www.youtube is a bit laggy on this windows notebook.

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: siria
Date: November 08, 2018 02:13AM

Am using that syntax to see the mobile version (mainly just for getting read access to the description on my old computer, then download with the Gantt-script, or not)
https://m.youtube.com/watch?v=xxxxxxxxxxxx&fulldescription=1&app=m

Quote
Mello
By using m.youtube I can get to the site but as soon as I select
a video to play only www.youtube version opens. I'm using a mobile
useragent and have doublechecked it is working at https://www.whatsmyua.info

Just as general info, also for other readers, such checks can only show the global override strings.
But younger KM-versions can autoswitch domain-specific useragents, and Goanna comes already with a bunch of predefined sites, incl. youtube.

Site-specific UAs can be found and checked on about:config, by filtering for "agent".
But so far those predefined ones are hardcoded inside omni.ja/goanna.js, instead of adding a file in the preferences folder, so they can't be deleted as easily as self-defined ones. Only changed or disabled: by double- or right-clicking and deleting the string (or hack omni.ja, or define an empty string in profile/user.js) Then the pref is still there, but if it's empty the global (fake) UA will be used again.

For younger KM-versions I strongly recommend my useragents2018 macro:
http://kmeleonbrowser.org/forum/read.php?9,143898


Basically it works like the ancient macro from 2008, it fakes the global UA by filling the native Mozilla pref "general.useragent.override", but additionally it helps defining site-specific useragents ("Automatic"), and checking them on aboutconfig.
This is also done by just filling native Mozilla prefs. That means site-specific UAs fully depend from the browser engine, if it supports this function already or not, otherwise this macro can do nothing about it (Goanna works out-of-box, KM74-KM76RC contain the function too but need a little init-hackfix in omni.ja)

And when clicking on "View current" that macro shows the current (fake) string for the domain in the urlbar, in a little popup. This uses the general javascript function "navigator.userAgent".
Attention another trap: some sites (like youtube) use different domains, not just the one in the urlbar. That's when global fakes come in handy again.



Edited 6 time(s). Last edit at 11/08/2018 02:56AM by siria.

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: Mello
Date: November 08, 2018 05:08PM

I'm using your useragents2018 macro with Goanna 76 so have i got this right? The hardcoded youtube UA is taking precedence over the macro2018's mobile UA unless I delete the goanna u/a string in about:config.



Edited 1 time(s). Last edit at 11/08/2018 05:09PM by Mello.

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: siria
Date: November 08, 2018 07:46PM

If unsure, just verify by reloading a page, then click "view current useragent string" and it will show which UA was sent. Check this directly after the page load, without doing any changes in between.

Quote
Mello
I'm using your useragents2018 macro with Goanna 76 so have i got this right? The hardcoded youtube UA is taking precedence over the macro2018's mobile UA unless I delete the goanna u/a string in about:config.

Let me reword that:
If a site-specific useragent for the current domain is stored in the prefs, then this string is taking precedence over the global useragent. After all, that's what automatic site-UAs are all about.

This macro has menu entries to handle both types:
the UA-list in the middle is for setting the global UA, just as in old KM 1.x,
and anything with "automatic" in the name is for handling site-specific UAs.

Note:
users who update KM by overwriting their old installation, instead of using a fresh clean install, may unknowingly still have old addons running in the background too (the Firefox type, not just a 'macro'). Especially the multiswitcher extension which was hardcoded in some older forks out-of-box. This can cause conflicts of course.
=> just check if "view current UA" shows what you want, if yes, then all is fine and no conflicts.



Edited 1 time(s). Last edit at 11/08/2018 07:56PM by siria.

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: Mello
Date: November 08, 2018 08:31PM

Thanks for explaining siria, I got it!

A very useful macro.

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: Mello
Date: November 10, 2018 01:06AM

Do you have any other mobile user agents you can recommend?

The two you have are fine but I've experimented with a few others and have trouble with either youtube or twitter.

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: siria
Date: November 10, 2018 03:53AM

Thanks for confirmation! Yes custom UAs are absolutely essential, and in the past was a core function in KM, too bad that Dorian had decided to remove it and rely only on compat modes. Wonder if he'd still think so today.

The funny thing is, in a few special cases it even helps better now to 'downgrade', for example fake IE7 instead of hypermodern FF60+. Helps my very low resource system on amazon, and allows to read mobile.twitter.com, but probably not videos. Many sites still support IE7 agent, when any newer strings get refused mobile access, even contemporary Firefox or even IE8. And in a few really tough cases a very old Opera Mini string helps to get access to a mobile page version:
Opera/9.80 (J2ME/MIDP; Opera Mini/5.1.21214/21.529; U; en) Presto/2.5.25 Version/10.54

But there are really thousands of Useragent strings! Am no expert on those, only on macros smiling smiley Can give you just some links to endless lists to choose from.

https://developers.whatismybrowser.com/useragents/explore/
https://techblog.willshouse.com/2012/01/03/most-common-user-agents/
https://myip.ms/browse/comp_browsers/Computer_Browsers.html

But one thing tends to get overlooked: the system in the string is important too.
If it contains for example old XP, some big webservices have been reported to dislike it and cause unnecessary probs. Remember something about stammering twitter, but then again, if you use a mobile UA the system key is probably not your prob ;-)
Just a short system summary:
"Windows NT 5.0" means Win2000; 5.1=XP; 5.2=XP64; 6.0=Vista; 6.1=Win7; 6.2=8; 6.3=8.1; 10.0=10



Edited 1 time(s). Last edit at 11/10/2018 04:51PM by siria.

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: Mello
Date: November 10, 2018 05:00PM

Thanks for clearing this up, I was trying a few recent u/a's thinking they'd be better.

Quote

"Windows NT 5.0" means Win2000; 5.1=XP; 5.2=XP64; 6.0=Vista; 6.1=Win7; 6.2=8; 6.3=8.1; 10.0=10

Very useful to know.

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: KM2005
Date: November 11, 2018 01:37AM

@siria,"fake IE7 instead of hypermodern FF60+. Helps my very low resource system on amazon".

Do you filter CSS on amazon, or ebay too?

Options: ReplyQuote
Re: Force youtube mobile site on desktop / useragents (howto)
Posted by: siria
Date: November 11, 2018 03:24PM

Quote
KM2005
@siria,"fake IE7 instead of hypermodern FF60+. Helps my very low resource system on amazon".

Do you filter CSS on amazon, or ebay too?

CSS (userstyles) is a vast field, and tends to drift off, let's better use that own thread:

http://kmeleonbrowser.org/forum/read.php?1,148234

It's about amazon, and just a start. Have some more stuff, but it's all for KM1.6, and you're using a modern KM version, so not sure what of my old stuff makes sense.
For ebay please create a new thread if you like. But have much less for it, hardly anything and given up years ago.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.