facebook tag list enabler

just comment tag like plain text

  1. // ==UserScript==
  2. // @name facebook tag list enabler
  3. // @description just comment tag like plain text
  4. // @match https://www.facebook.com/*
  5. // @version 2
  6. // @grant none
  7. // @namespace https://gf.qytechs.cn/users/4947
  8. // ==/UserScript==
  9.  
  10. __d("getMentionsTextForContentState", ["ComposedEntityType", "DocumentCharacters", "DocumentEntity", "emptyFunction"], function (a, b, c, d, e, f, g, h, i, j) {
  11. var k = j.thatReturnsTrue,
  12. l = /[\\\]:]/g;
  13.  
  14. function m(n) {
  15. var o = n.getBlockMap().map(function (p) {
  16. var q = p.getText(),
  17. r = '';
  18. p.findEntityRanges(j.thatReturnsTrue, function (s, t) {
  19. var u = p.getEntityAt(s);
  20. if (u === null) {
  21. r += q.slice(s, t);
  22. } else {
  23. var v = i.get(u);
  24. if (v.getType() === k) {
  25. r += v.getData().originalEmoticon;
  26. } else r += q.slice(s, t);
  27. }
  28. });
  29. return r;
  30. });
  31. return o.join(l);
  32. }
  33.  
  34. function n(o, p) {
  35. if (p) {
  36. var q = i.get(p);
  37. if (q.getType() === g.MENTION) {
  38. o = o.replace(l, function (r) {
  39. return '\\' + r;
  40. });
  41. return '@[' + q.getData().id + ':' + o + ']';
  42. } else if (q.getType() === g.EMOTICON) return q.getData().originalEmoticon;
  43. }
  44. return o.replace('@[', '@ [');
  45. }
  46. e.exports = m;
  47. }, null);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址