CSS: m.facebook.com - text copy

Corrections to UI of Facebook for mobile browsers: text copy enabled

As of 18. 02. 2021. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name          CSS: m.facebook.com - text copy
// @description   Corrections to UI of Facebook for mobile browsers: text copy enabled
// @author        MK
// @namespace     max44
// @homepage      https://greasyfork.org/en/users/309172-max44
// @include       https://m.facebook.com/*
// @include       http://m.facebook.com/*
// @version       1.1.1
// @note          v1.1.1 2021-02-18: @namespace and @homepage changed
// @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 the link which covers the whole message text*/
  a._5msj {
    visibility: hidden !important;
  }

  /*Make cursor normal*/
  body {
    cursor: auto !important;
    -webkit-text-size-adjust: auto !important;
    -moz-text-size-adjust: auto !important;
    -ms-text-size-adjust: auto !important;
    -o-text-size-adjust: auto !important;
    text-size-adjust: auto !important;
  }

  /*Allow text selection*/
  #viewport, #root, #MRoot, #m_news_feed_stream, #modalDialogView, ._5rgr, ._5rgu, ._5t8z, .widePic, ._56be, ._26pa, ._i81, ._1_uo {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    -o-user-select: text !important;
    user-select: text !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);
  }
})();