CSS: m.facebook.com - clear UI

Corrections of m.facebook.com CSS: UI is cleared

目前為 2020-12-29 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name          CSS: m.facebook.com - clear UI
// @description   Corrections of m.facebook.com CSS: UI is cleared
// @author        MK
// @homepage      https://greasyfork.org/en/scripts/
// @namespace     https://greasyfork.org/users/309172
// @include       https://m.facebook.com/*
// @include       http://m.facebook.com/*
// @version       1.0
// @note          v1.0 2020-12-29 - initial release
// ==/UserScript==
 
(function() {
  var css = `
  /*Remove MBackNavBar - back arrow header above the current message*/
  #MBackNavBar {
    visibility: hidden !important;
    height: 0px !important;
  }

  /*Remove mDialogHeader
  #mDialogHeader {
    visibility: hidden !important;
    height: 0px !important;
  }*/

  /*Remove MStoriesTray - box with various stories*/
  #MStoriesTray {
    visibility: hidden !important;
    height: 0px !important;
  }

  /*Remove conversation guides*/
  /*#u_0_11, #u_jb_9, #u_1y_8*/
  /*[id^="u_"][id$="_8"],
  [id^="u_"][id$="_9"],
  [id^="u_"][id$="_10"],
  [id^="u_"][id$="_11"]*/
  [class^="_7an"],
  ._4l3w {
    visibility: hidden !important;
    height: 0px !important;
  }

  /*Make smaller clickable area around "Like", "Reply" and "More"*/
  a._2b0a {
    padding: 3px 8px 3px 8px;
    /*margin: 0px 0px 7px 0px;*/
  }

  /*Make darker background for new interface header*/
  /*#mJewelNav {
    background: #30a9d6*/ /*#eea1c6*/ /*#b5cdff*/ /*!important;
  }*/
  `;

  if (typeof GM_addStyle != 'undefined') {
    GM_addStyle(css);
  } else if (typeof PRO_addStyle != 'undefined') {
    PRO_addStyle(css);
  } else if (typeof addStyle != 'undefined') {
    addStyle(css);
  } else {
    var node = document.createElement('style');
    node.type = 'text/css';
    node.appendChild(document.createTextNode(css));
    var heads = document.getElementsByTagName('head');
    if (heads.length > 0) {
      heads[0].appendChild(node);
    } else {
      // no head yet, stick it whereever
      document.documentElement.appendChild(node);
    }
  }
})();