-
-
Save chriskyfung/abad63aa24af3d8226ca4f5741b6a768 to your computer and use it in GitHub Desktop.
/* This program is free software. It comes without any warranty, to | |
* the extent permitted by applicable law. */ | |
// ==UserScript== | |
// @name Switch to mobile to desktop version of Facebook linkes | |
// @namespace https://gist.github.com/chriskyfung/abad63aa24af3d8226ca4f5741b6a768 | |
// @description When you open a moblile version of facebook, you're redirected to desktop version so that it can view in high-resolution. | |
// @match https://m.facebook.com/* | |
// @run-at document-start | |
// @version 0.0.1 | |
// @resource LICENSE | |
// ==/UserScript== | |
var mobileURLRe = /(?:m.facebook.com|^)/; | |
if (mobileURLRe.test(document.location.href)) { | |
var target = document.location.href.replace("m.facebook", "www.facebook"); | |
window.location.replace(target) | |
} |
Thanks Chris, this works great for me. It's funny that in 2020 you still have to do this even!
Alternatively, you might try the Chrome Extension called Mobile2Desktop Facebook Links by Hornobster, available on Chrome Web Store.
Dear @chriskyfung, I don't know how to use it. Can you give me an instruction? When I click on the link http://fblink_mobile2desktop.user.js/, it shows:
Hi @liwenjing93,
You must install TamperMonkey on Chrome beforehand.
Homepage: https://www.tampermonkey.net/
Hi @liwenjing93,
You must install TamperMonkey on Chrome beforehand.
Homepage: https://www.tampermonkey.net/
Dear, I am using violentmonkey, is that ok? there are some scripts do not work with TamperMonkey so I can not use it. Thanks
ViolentMonkey is ok. Just less safe because it has fewer restrictions.
[Userscript] Auto-redirect from mobile to desktop Facebook version
User script to automatically redirect a Facebook mobile link to a desktop version on Chrome and Firefox with Tampermonkey
Credits
Developer Chris KY Fung (@chriskyfung) Created on 26 October, 2018
License
The MIT License (MIT)
Copyright (c) 2018 Chris KY Fung
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Alternative