Skip to content

Instantly share code, notes, and snippets.

@zeuxisoo
Created February 18, 2021 07:47
Show Gist options
  • Save zeuxisoo/ccb9672be4eda930a897260fcc89cbe5 to your computer and use it in GitHub Desktop.
Save zeuxisoo/ccb9672be4eda930a897260fcc89cbe5 to your computer and use it in GitHub Desktop.
Redirect www to mbasic when meet facebook com in url for Greasemoney / Tampermonkey
// ==UserScript==
// @name Redirect to mbasic facebook
// @namespace https://www.facebook.com/
// @version 0.1
// @description try to redirect to mbasic facebook
// @author Zeuxis Lo
// @match *://www.facebook.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
window.location = new URLSearchParams(window.location.search).get("next").replace("www", "mbasic");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment