UnMobileSearch – Stop search-engines from linking to mobile versions of sites

UnMobileSearch user-script

Purpose


As more and more people use mobile devices (i.e. phones, but also tablets) to browse the Internet
mobile versions of websites get used more and more, and since people will usually end up viewing
the mobile version of sites after doing a web-search, the mobile versions of sites have bubbled
up in search-engine results to surpass the non-mobile versions of those same sites. So now, if
you do a web-search you may get links to mobile versions of sites instead of non-mobile URLS.
There isn't really a way to stop this in your system or even in the search-engine as there's
no standardized method of a site to indicate its mobile version (many use a m. sub-domain),
but that is not necessarily universal. This user-script will detect results pages from any
search-engines it currently supports and try to switch any links to non-mobile versions.☺

Notes:

  • Mobile versions of sites aren’t standardized, so will have to accommodate site-by-site
  • Currently supported search-engines:
    • DuckDuckGo
    • NOT Google, and probably won’t for the foreseeable future because Google is evil 😒
  • Currently supports mobile URLs of the form X.* and *.X.* (where X is m or mobile)
  • Catches m./mobile. anywhere in the domain: foo.bar.m.baz.example.comfoo.bar.baz.example.com
  • Only one instance of m./mobile. is removed: a.m.b.m.c.coma.b.m.c.com
  • You’ll need a browser-extension like TamperMonkey, ViolentMonkey, or GreaseMonkey in order to use it
  • Sometimes the search results will actually return the mobiel and non-mobile versions of a page, in this case, you’ll end up with both two links to the non-mobile version

Download

UnMobileSearch 3

Screenshots

DuckDuckGo search results linking to mobile versions of sites
DuckDuckGo search results linking to mobile versions of sites
DuckDuckGo search results linking to non-mobile versions of sites
DuckDuckGo search results linking to non-mobile versions of sites