edit: formatting
You may find humour in the comically small "desktop" link at the very end of the page, next to the privacy policy.
// ==UserScript==
// @name Redirect from mobile wiki to desktop
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*.m.wikipedia.org/*
// @grant none
// @run-at document-start
// ==/UserScript==
window.location.hostname=window.location.hostname.split(".")[0]+".wikipedia.org";A tablet could be easily confused, or a phone in landscape mode, too, but for a phone in portrait mode this seems a bit hard to imagine, because DPI is taken into account when converting the display width into CSS pixels, so even a phone cramming 1080 or 1440 or whatever amount of physical screen pixels into its display width should still come in at something like 300 to 400ish CSS pixels. Or am I misunderstanding something?
Also, many times mobile breakpoints don't look at the device orientation and pick numbers like 800px, to capture landscape orientation on medium sized phones or something (I'm not sure where this number comes from to be honest). This obviously breaks the two windows side by side case on laptops but is a top result for me if you google the arcane syntax for how to target mobile browsers with a media query.
I am not 100% sure what all the pitfalls are with the current interface, but they exist often enough for me to run into them semi-frequently on smaller laptops.
The worst part of this is that simple mostly text sites without a fixed-with layout would look perfectly on mobile if this tag was the default but somehow mobile browser vendors thought it was better to hack around sites with table layouts by giving them a larger viewport (but still inconsitently scale the font sizes so you have to zoom in and out to read different parts).
Once you start with the hack of giving non-mobile-compatible pages a larger viewport in order to not break layouts that react allergic when being squeezed into 300-something pixels, what else do you want to do?
Not scaling font sizes at all just gives you either tiny text (if you zoom out to fit the large viewport onto the small mobile screen) or loads of scrolling around if you display the page at 100 % zoom level instead.
And scaling up all text means you end up approximatively just where you started before you started resizing the viewport. It might not be absolutely exactly the same layout breakage as when squeezing an old page directly into the 300 or so pixels available on a mobile phone in portrait mode, but it will be pretty similar.
So that only leaves trying to scale up only the main body of text (which normally isn't that sensitive with regards to scaling up the font size and therefore increasing its size requirements) and leaving alone smaller bits of text like menus, the page navigation etc., which are more likely to be size-constrained and start causing layout breakage if increased by an extraordinary amount.
The bigger problem is people hiding functionality if you're in the mobile breakpoint. That's an issue: all functionality should be enabled, at least in some way IMO. Mobile should never be a second class citizen :)
@media (hover: none) and (pointer: coarse) {
That allows the dev to select for devices that do not have a mouse and such rely on touch targets, to increase the sizing. I've been implementing this myself recently in our web application, while still allowing us to change the layout to fit the narrow width!I'm sure there are some devices it doesn't fit perfectly for though. This stuff is capital-H hard.
You mean quote-unquote Hard?
The implementations for these have some... complications, the device sets we now deal with are huge, and making sure there are no idiosyncratic bugs that creep up when using them is legitimately a fair bit of work.
It's not, is the thing.
I have a 23 inch screen for my 1080p screen. My phone has a 6ish inch diagonal.
When I make a window 960 x 1080, that's still something like 10 inches across and 11 inches tall. It's sheet-of-paper sized. I'm perfectly comfortable reading that as it was designed for a desktop layout.
Do you sit as close to your monitor as you hold your phone?
Phones are far taller than half of a 1080p screen.
Half a monitor is: 960 x 1080, or 1:1.125 A iPhone is: 828 x 1792, or 1:2.164
So websites tend to shove a candybar shape into a nearly square sheet of paper and waste a lot of usable proportions for things like controls or hamburger menus.
I really, REALLY prefer desktop mode for almost everything, relying on pinch to zoom.
It shouldn't, because with proper reactive design therre are no "mobile" and "desktop" versions but only one version that adapts to the viewport size. If you want a larger viewport that should be solved at the browser level by providing the website with a larger viewport. Seems firefox behaves this way while chrome does something weird that increases the viewport a bit but then still "intelligently" scales some text.
But, at least as far as I approach media queries, if you've triggered the mobile breakpoint (well, default CSS as mobile-first is the way we approach it), its because the desktop design we've used literally will break on a browser window that narrow.
I agree that you should prefer flow and size-to-fit but that does not mean that break points are never the right tool.
I agree, although in the case of Wikipedia the "mobile" design is actually the one that is responsive. I want the "mobile" design on all browsers including my desktop. I believe you can actually set your default theme if you're logged into Wikipedia, but I don't know if their cookies eventually expire or what, but I often end up clicking on Wikipedia links and getting the awful "desktop" design.
All of this is just to say that, yes, they shouldn't use separate "m." URLs, but it's just as wrong to get upset at mobile users sharing "m." URLs as it is to get upset at desktop users sharing URLs without the "m." Arguably if you expect all users to always share the most versatile URL, you should expect them to always share the "m." URL since it has a responsive design.
Also the mobile site might be more responsive in the sense that it better scales down to narrower viewports but it does not scale up to make use of larger viewports by e.g. bringing back the sidebar and other links that are hidden behind dropdowns. That's a problem with many mobile-first designs - in reallity they are mobile-only designs.
I’m career military and the fact that Wikipedia (and Facebook) have low bandwidth m.* redirects made life immensely easier on the limited internet in far off places. We really appreciated it being available.
https://en.wikipedia.org/wiki/Yugoslav_gunboat_Beli_Orao - 913.39 KB / 298.41 KB transferred
https://en.m.wikipedia.org/wiki/Yugoslav_gunboat_Beli_Orao - 919.43 KB / 270.18 KB transferred
Not much of a difference. Would be better to spend time optimizing the desktop site for everyone.
On a phone, the mobile Wikipedia is perfect tho.
However, that link is totally in the wrong place, no wonder I could not find it. I just assumed there was no such link/button and always angrily removed the 'm.' from each URL.
https://addons.mozilla.org/en-US/firefox/addon/skip-mobile-w...
They used to just put "?s=19" through "?s=22" or so, which enumerated clients (desktop, mobile, Android, etc), which was better than the junk most other services stuff in (like utm_source and friends...)
There is no way to interpret requesting a dedicated mobile URL other than as specifically asking for the mobile version of the page.
Or are you saying Wikipedia should be aware that you got the link from your obnoxious friend? HTTP doesn't really allow for that.
I think you vastly overestimate the number of people typing `en.m.wikipedia.org` in. I'm pretty sure the number of people doing that is negligible, in fact.
And by the way, I wouldn't care about the existence of en.m.wikipedia.org nearly as much if it actually were opt-in. Because then it would be a lot more rare. The problem is that Wikipedia opts you into it implicitly if you are on mobile. Which means that if anyone in a chain of clicking on and then sharing a link is on mobile... suddenly everyone sees the mobile link and needs to do much more work than "click on a link" to opt OUT of it.
Well over 50% of the Wikipedia links I see these days are mobile links and 0% of the time am I clicking on them from a mobile device.
I guess the best way to do it would be to redirect the user to the correct domain based on agent, if they haven’t already chosen an override?
There's no reason for them to have a different URL for the mobile views (it should be a cookie or session state if the user explicitly overrides, otherwise automatic) and there IS a reason that Wikipedia is basically the only major site still in existence that doesn't serve up their mobile-designed view on the same URL. Yes, `m.` was a huge trend back in the days of "mobile" meaning "a crappy J2ME browser", but it's not anymore and for damn good reason!
This is already the behavior of Wikipedia mobile pages.
> I guess the best way to do it would be to redirect the user to the correct domain based on agent, if they haven’t already chosen an override?
This, on the other hand, is already the behavior of Wikipedia's normal pages.
The mobile page will give you what you asked for, and the normal page will give you what it thinks you probably want. These are both approaches that you could argue for.
But I can't understand why everyone is trying to argue that the give-you-what-you-want approach is actually, if you think about it hard enough, the give-you-what-you-asked-for approach.
No, it's not. The behavior of the mobile pages is always mobile-optimized no matter what.
I can only assume you are trolling because you are assuming a meaning that is the complete antithesis of what namdnay explicitly said (and what everyone else in this dead thread has been telling you). Therefore I will go ahead and say farewell and good luck.
But it's kinda crazy that if I'm on my phone I can't just share a URL to a page with someone who happens to be using a desktop. While I'm not sure if this is made explicit in any of the RFCs or standard docs, in my view a URL should be a locator for a resource that is agnostic of the user agent.
> in my view a URL should be a locator for a resource that is agnostic of the user agent.
You're not making sense. The mobile page has a dedicated URL. If you're browsing it, then sharing the URL will send anyone else to the same resource you're browsing, regardless of their user agent. Everyone agrees that this is a bad thing for you to do. Don't do it.
The standard page will redirect mobile user-agents to the mobile page. It is a better URL to give out in every possible way. But note that this is the opposite of what you're saying; the URL that behaves the way you say you want is the bad one that you should avoid sharing.
I am sympathetic to the view that the URL should just point wherever it points. This would require a change to Wikipedia's standard page so that it would display when requested on mobile instead of redirecting. That's fine. But sharing mobile links would still be awful behavior. Link to the standard page. That's what makes it the standard page.
The use case is: I go to the standard wikipedia page, browse a bit, and then I want to give out links to the standard wikipedia page of a specifig article.
This is currently not possible without editing the URL if you are on mobile. And I dont understand why wikipedia is refusing to fix this.
This is pretty obvious in the general case, where it would be impossible for me to know if the URL I am visiting contains information about my particular user agent and is thus inappropriate to share with people with other user agents. When my user agent requests "en.wikipedia.org" and receives a redirect to "en.m.wikipedia.org" there's simply no way to know whether this resource has actually moved to a new URL (which is the semantics of the HTTP response) or whether this is simply a special URL that I shouldn't share. Yes, some people might be familiar with the "m." subdomain for mobile-specific websites, but in general this sort of thing is (in my opinion) an abuse of HTTP redirects.
As I just pointed out, and you somehow misunderstood, this is the exact behavior of the mobile page. It is not the behavior of the standard page. But sharing a link to the mobile page is bad, and sharing a link to the standard page is good. Keep this in mind when you're deciding how URLs should behave.
This is how mobile wikipedia pages behave. What part of that do you disagree with?
Share a mobile page's URL and the person following your link will see the same page you do, no matter what your user-agent is, no matter what their user-agent is, no matter what device you're using, no matter what device they're using.
This is the problem. The behavior you are looking for, of different people seeing different content according to their user-agent, is also provided, and it's provided by the standard page.
And I would argue that this is not only the point but the problem we are talking about. It makes the m. pages appear all over the Internet although they are less suitable for some devices (they are, I'd argue, even less usable because, e.g., the page history is missing when you are not logged in).
What am I mistaken about? This is exactly what I said happens. I focused this information pretty heavily:
>> The standard page will redirect mobile user-agents to the mobile page.
>> I am sympathetic to the view that the URL should just point wherever it points. This would require a change to Wikipedia's standard page so that it would display when requested on mobile instead of redirecting.
No one is talking about what should happen. They're saying that, as you've confirmed, m.* is a separate resource from en.* because they exist as 2 separate pages on wikipedia.org. On the en.* page, people on mobile are incorrectly redirected to m.* which it seems that everyone agrees shouldn't be the behavior. The opposite, m.* redirecting people on desktop, doesn't occur.
That means that your statement that "URLs should be for a specific resource" contradicts your other statement that "sharing that URL ought [not] to send anyone to the mobile design". If the mobile page is a separate resource, then sending someone a link to m.* should always load that resource (the mobile version) which seems to the be the opposite of what you're suggesting.
Additionally, there seems to be additional confusion because everyone is assuming that the page loaded at m.* is the same page as that loaded on en.* but that doesn't seem to be the case as the page isn't responsive. It's the same text content but the stylesheet and headers are different which, by web standards, is a separate resource.
Everyone agrees with you on this point. You shouldn't need to manually manipulate anything but, because Wikipedia keeps a desktop resource and a mobile resource, there is a distinction and so you do need to manually manipulate it if you're sending a link from mobile to someone else and don't know their device. That doesn't change the fact that sending a mobile URL should always show the mobile page because that is, in fact, a unique resource and, therefore, has a unique URL.
As I've explained, even knowing their device is not sufficient, because someone on a desktop device may prefer the "mobile" design (which is responsive) or someone on a mobile device may prefer the desktop design (because it apparently contains more features). And if you're sharing the link with multiple people or publicly, you obviously can't accommodate mutually exclusive preferences.
If en.m. is asking for the mobile version, then en. is asking for the desktop version, yes? So why does en. redirect to en.m. on mobile?
It reflects the fact that standard pages existed before mobile pages did.
It's relevant that there are functional differences because those are not presentational differences. HTML is for content, CSS is for presentation. If the HTML is different, then it's a different resource and, therefore, gets a different resource locator (URL).
The chasing left side TOC is really useful. The typography is slightly fancy without trying to be in your face.
The search (kbd /) is nice too.
I'd motivate the author to experiment with more stuff around accessing categories and hyperlinks in the page.
Fortunately this is pretty simple to disable with Greasemonkey (also 's' on github, though the userscript doesn't seem to work on Gitlab...).
I like it!
If "new" were to become the only way to access Reddit, I would probably abandon it.
I can suggest wiby.me 's random button to discover new sites with modern opinions.
disclaimer: I run lemmy.pt and use the platform on a daily basis
On mobile you seem to need to do old.reddit.com every time.
Never installed the app on mobile.
Although other changes might have made things better, like changing how default subreddits work (although this applies to new and old reddit).
With the exception of a few subreddits that have made explicit rule changes (either encouraging or discouraging memes), I haven't really noticed a significant long term trend in meme-posting within subreddits.
And even then, browsing /r/popular is just awful. Elimination games. People blatantly asking for personal information from teenagers. "Tell me your favorite X and we will judge you" Dumb NSFW 'questions'. Repost bots for content from years ago. Misinformative titles. "Unpopular opinion" threads.
It's a mountain of trash to wade through to get any decent content.
Watching many of those short anger-inducting videos can make even a calm person change. The sort of stuff Reddit PMs have signed off on in the name of engagement is despicable.
That might have been their goal?
Although I detest having to use apps for every site. The Reddit app is also super buggy.
Chrome plugins add more unwelcome startup bloat to the web browser, and while they are super useful to fix the UI issues of commercial, copyrighted websites, Wikipedia can totally legally be replicated at another domain.
Also just like with open source projects, just because you are allowed to fork does not mean that you should as you could end up hurting the original project by e.g. confusing users.
I'm not sure I like it. The better line width is really welcome, but I'm tad uneasy about the rest. And as far as I can recall, it doesn't have a dark theme (yet).
I miss the Encarta encyclopedia content/design. I wish Wikipedia could get to that level of content quality. The multimedia and interactive articles were way ahead of its time and were only partially matched by some Flash-based interactive animations.
You don't need 20MB React bundles to make a good-looking website, and OP proves that perfectly
Actually, I'm wrong. It looks like they FINALLY added it less than a week ago.
Took them long enough.
This is exactly how CSS and HTML were intended to operate and the kind of results to be expected.
> But i am sure there are people who will appreciate your effort. Thank you for your work.
How is that called ? A complimentsult ?
But i am sure there are people who will appreciate your effort. Thank you for your work.