Skip to content

Instantly share code, notes, and snippets.

@chriskyfung
Last active September 2, 2023 11:03
Show Gist options
  • Save chriskyfung/abad63aa24af3d8226ca4f5741b6a768 to your computer and use it in GitHub Desktop.
Save chriskyfung/abad63aa24af3d8226ca4f5741b6a768 to your computer and use it in GitHub Desktop.
User script to automatically redirect a Facebook mobile link to a desktop version on Chrome and Firefox with Tampermonkey
@chriskyfung
Copy link
Author

chriskyfung commented Nov 1, 2019

[Userscript] Auto-redirect from mobile to desktop Facebook version

cover image of fblink_mobile2desktop.user.js

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

  1. Requestly - Lightweight Proxy to Intercept & Modify HTTP(s) requests (SaaS, Chrome, Edge, Firefox)

@djmips
Copy link

djmips commented Apr 23, 2020

Thanks Chris, this works great for me. It's funny that in 2020 you still have to do this even!

@chriskyfung
Copy link
Author

Alternatively, you might try the Chrome Extension called Mobile2Desktop Facebook Links by Hornobster, available on Chrome Web Store.

@liwenjing93
Copy link

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:

image

@chriskyfung
Copy link
Author

Hi @liwenjing93,

You must install TamperMonkey on Chrome beforehand.
Homepage: https://www.tampermonkey.net/

@liwenjing93
Copy link

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

image

@chriskyfung
Copy link
Author

ViolentMonkey is ok. Just less safe because it has fewer restrictions.

@liwenjing93
Copy link

ViolentMonkey is ok. Just less safe because it has fewer restrictions.
THank you, I have just figured it out, I have to click on RAW button, not the link earlier.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment