CSS: m.facebook.com - cleaner UI

Corrections to UI of Facebook for mobile browsers: remove useless panels

当前为 2021-02-18 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name          CSS: m.facebook.com - cleaner UI
// @description   Corrections to UI of Facebook for mobile browsers: remove useless panels
// @author        MK
// @namespace     max44
// @homepage      https://greasyfork.org/en/users/309172-max44
// @include       https://m.facebook.com/*
// @include       http://m.facebook.com/*
// @version       1.2.1
// @note          v1.2.1 2021-02-18: @namespace and @homepage changed
// @note          v1.2 2021-01-05: CSS for smaller clickable area around "Like", "Reply" and "More" is amended
// @note          v1.1 2021-01-01: code is rewritten to add CSS to the end of the document instead of <HEAD> tag in order to overcome possible server side CSS with !important rule
// @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));
    document.documentElement.appendChild(node);
  }
})();