CSS: m.facebook.com - text copy

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

  1. // ==UserScript==
  2. // @name CSS: m.facebook.com - text copy
  3. // @description Corrections to UI of Facebook for mobile browsers: text copy enabled
  4. // @author MK
  5. // @namespace max44
  6. // @homepage https://greasyfork.org/en/users/309172-max44
  7. // @match *://m.facebook.com/*
  8. // @icon https://static.xx.fbcdn.net/rsrc.php/yD/r/d4ZIVX-5C-b.ico
  9. // @version 1.3.2
  10. // @license MIT
  11. // @run-at document-idle
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. var css = `
  16. /*Remove the link which covers the whole message text*/
  17. /*a._5msj {
  18. visibility: hidden !important;
  19. }*/
  20.  
  21. /*Make cursor normal*/
  22. .ssr [data-action-id], .ssr, .m {
  23. cursor: auto !important;
  24. -webkit-text-size-adjust: auto !important;
  25. -moz-text-size-adjust: auto !important;
  26. -ms-text-size-adjust: auto !important;
  27. -o-text-size-adjust: auto !important;
  28. text-size-adjust: auto !important;
  29. }
  30.  
  31. /*Allow text selection*/
  32. .m, html.unselectable * {
  33. -webkit-user-select: text !important;
  34. -moz-user-select: text !important;
  35. -ms-user-select: text !important;
  36. -o-user-select: text !important;
  37. user-select: text !important;
  38. }
  39.  
  40.  
  41. /*Normalize font sizes*/
  42.  
  43. /*Number of reactions under post - make its text smaller*/
  44. /*div.m.bg-s2 > div[data-type="container"] > div[data-mcomponent$="TextArea"] > div.native-text,
  45. div.m.bg-s3 > div[data-type="container"] > div[data-mcomponent$="TextArea"] > div.native-text {
  46. font-size: var(--tiny-font-size) !important;
  47. }*/
  48.  
  49. /*Name of comment's author - make it's text bigger*/
  50. div.m.bg-s3 > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-mcomponent$="TextArea"] > div.native-text > span.f6,
  51. div.m.bg-s3 > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-type="transactional"] > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-mcomponent$="TextArea"] > div.native-text > span.f6,
  52. div.m.bg-s6 > div[data-mcomponent$="TextArea"] > div.native-text > span.f6,
  53. div.m.bg-s2 > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-mcomponent="MContainer"] > div[data-type="transactional"] > div[data-mcomponent="MContainer"] > div[data-mcomponent$="TextArea"] > div.native-text > span.f6 {
  54. font-size: var(--regular-font-size) !important;
  55. }
  56. /*Reactions panel under comment - make its text smaller*/
  57. /*div[data-mcomponent="MContainer"] > div[data-type="container"] > div[data-type="transactional"]:last-of-type > div[data-type="container"] > div[data-mcomponent$="TextArea"] > div.native-text,
  58. div[data-mcomponent="MContainer"] > div[data-type="container"] > div[data-type="transactional"]:last-of-type > div[data-type="container"] > div[data-mcomponent="MContainer"] > div[data-mcomponent$="TextArea"] > div.native-text > span.f2,
  59. div[data-mcomponent="MContainer"] > div[data-type="container"] > div[data-type="transactional"]:last-of-type > div[data-type="container"] > div[data-mcomponent$="TextArea"] > div.native-text > span.f2,
  60. div[data-mcomponent="MContainer"] > div[data-type="container"] > div[data-type="transactional"]:last-of-type > div[data-type="container"] > div[data-mcomponent="MContainer"]:not(.bg-s6) > div[data-mcomponent$="TextArea"] > div.native-text {
  61. font-size: var(--tiny-font-size) !important;
  62. }*/
  63.  
  64. /*Name of unfolded reply's to comment author - make its text smaller*/
  65. /*div.m.bg-s2 > div[data-mcomponent="MContainer"] > div[data-type="container"] > div[data-mcomponent="MContainer"] > div[data-mcomponent$="TextArea"] > div.native-text > span.f2,
  66. div.m.bg-s2 > div[data-mcomponent="MContainer"] > div[data-type="container"] > div[data-mcomponent="MContainer"] > div[data-mcomponent$="TextArea"] > div.native-text {
  67. font-size: var(--tiny-font-size) !important;
  68. }*/
  69. `;
  70.  
  71. if (typeof GM_addStyle != 'undefined') {
  72. GM_addStyle(css);
  73. } else if (typeof PRO_addStyle != 'undefined') {
  74. PRO_addStyle(css);
  75. } else if (typeof addStyle != 'undefined') {
  76. addStyle(css);
  77. } else {
  78. var node = document.createElement('style');
  79. node.type = 'text/css';
  80. node.appendChild(document.createTextNode(css));
  81. document.documentElement.appendChild(node);
  82. }
  83. })();