FB2mbasic

重整網頁就轉成mbasic.FB,避免www.FB或m.FB不定時重整讓您丟失目前網頁問題。Reload webpage to switch mbasic.FB, in order to avoid intermittent updates on www.FB or m.FB that may cause you to lose your current webpage state.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         FB2mbasic
// @author       Li_Bibo
// @namespace    https://greasyfork.org/zh-TW/scripts/474729
// @description  重整網頁就轉成mbasic.FB,避免www.FB或m.FB不定時重整讓您丟失目前網頁問題。Reload webpage to switch mbasic.FB, in order to avoid intermittent updates on www.FB or m.FB that may cause you to lose your current webpage state.
// @match        *://www.facebook.com/*
// @match        *://m.facebook.com/*
// @run-at       document-start
// @version 0.2.1.2
// @license     GNU GPLv3
// ==/UserScript==
var utm = location.href.match("//www.", "//m.")
if (utm == null)
{
    return
}
else
{
    utm = location.href.replace("//www.", "//mbasic.");
    location.replace (utm);
}
var url = location.href.match("//mbasic.")
if (url == null)
{
    return
}
else
{
    url = location.href.replace("//m.", "//mbasic.");
    location.replace (url);
};