CSS: m.facebook.com - text copy

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

目前為 2021-01-01 提交的版本,檢視 最新版本

  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. // @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.1
  10. // @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
  11. // @note v1.0 2020-12-29 - initial release
  12. // ==/UserScript==
  13. (function() {
  14. var css = `
  15. /*Remove the link which covers the whole message text*/
  16. a._5msj {
  17. visibility: hidden !important;
  18. }
  19.  
  20. /*Make cursor normal*/
  21. body {
  22. cursor: auto !important;
  23. -webkit-text-size-adjust: auto !important;
  24. -moz-text-size-adjust: auto !important;
  25. -ms-text-size-adjust: auto !important;
  26. -o-text-size-adjust: auto !important;
  27. text-size-adjust: auto !important;
  28. }
  29.  
  30. /*Allow text selection*/
  31. #viewport, #root, #MRoot, #m_news_feed_stream, #modalDialogView, ._5rgr, ._5rgu, ._5t8z, .widePic, ._56be, ._26pa, ._i81, ._1_uo {
  32. -webkit-user-select: text !important;
  33. -moz-user-select: text !important;
  34. -ms-user-select: text !important;
  35. -o-user-select: text !important;
  36. user-select: text !important;
  37. }
  38. `;
  39.  
  40. if (typeof GM_addStyle != 'undefined') {
  41. GM_addStyle(css);
  42. } else if (typeof PRO_addStyle != 'undefined') {
  43. PRO_addStyle(css);
  44. } else if (typeof addStyle != 'undefined') {
  45. addStyle(css);
  46. } else {
  47. var node = document.createElement('style');
  48. node.type = 'text/css';
  49. node.appendChild(document.createTextNode(css));
  50. document.documentElement.appendChild(node);
  51. }
  52. })();