Created
October 28, 2014 15:41
-
-
Save phanthai12/bc2719b26dffeb19d52b to your computer and use it in GitHub Desktop.
Change Url desktop to mobile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name mobile facebook | |
// @namespace mobile facebook | |
// @include https://www.facebook.com/* | |
// @version 1.0.0.1 | |
// @grant none | |
// ==/UserScript== | |
var fbUrl = document.URL; | |
if(!/https:\/\/www.facebook.com\/ai.php.*/g.test(fbUrl)){ | |
var mUrl = fbUrl.replace(/https:\/\/www/gi,"https://m"); | |
location.href = mUrl; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment