CSS: m.facebook.com - text copy

Corrections of m.facebook.com CSS: text copy enabled

目前为 2020-12-29 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name CSS: m.facebook.com - text copy
  3. // @description Corrections of m.facebook.com CSS: text copy enabled
  4. // @author MK
  5. // @homepage https://greasyfork.org/en/scripts/419355
  6. // @namespace https://greasyfork.org/users/309172
  7. // @include https://m.facebook.com/*
  8. // @include http://m.facebook.com/*
  9. // @version 1.0
  10. // @note v1.0 2020-12-29 - initial release
  11. // ==/UserScript==
  12. (function() {
  13. var css = `
  14. /*Remove the link which covers the whole message text*/
  15. a._5msj {
  16. visibility: hidden !important;
  17. }
  18.  
  19. /*Make cursor normal*/
  20. body {
  21. cursor: auto !important;
  22. -webkit-text-size-adjust: auto !important;
  23. -moz-text-size-adjust: auto !important;
  24. -ms-text-size-adjust: auto !important;
  25. -o-text-size-adjust: auto !important;
  26. text-size-adjust: auto !important;
  27. }
  28.  
  29. /*Allow text selection*/
  30. #viewport, #root, #MRoot, #m_news_feed_stream, #modalDialogView, ._5rgr, ._5rgu, ._5t8z, .widePic, ._56be, ._26pa, ._i81, ._1_uo {
  31. -webkit-user-select: text !important;
  32. -moz-user-select: text !important;
  33. -ms-user-select: text !important;
  34. -o-user-select: text !important;
  35. user-select: text !important;
  36. }
  37. `;
  38.  
  39. if (typeof GM_addStyle != 'undefined') {
  40. GM_addStyle(css);
  41. } else if (typeof PRO_addStyle != 'undefined') {
  42. PRO_addStyle(css);
  43. } else if (typeof addStyle != 'undefined') {
  44. addStyle(css);
  45. } else {
  46. var node = document.createElement('style');
  47. node.type = 'text/css';
  48. node.appendChild(document.createTextNode(css));
  49. var heads = document.getElementsByTagName('head');
  50. if (heads.length > 0) {
  51. heads[0].appendChild(node);
  52. } else {
  53. // no head yet, stick it whereever
  54. document.documentElement.appendChild(node);
  55. }
  56. }
  57. })();