Facebook Mobile - Fixed Header

Facebook Mobile With Fixed Header

  1. // ==UserScript==
  2. // @name Facebook Mobile - Fixed Header
  3. // @namespace https://facebook.com/bremaya2
  4. // @description Facebook Mobile With Fixed Header
  5. // @author bremaya
  6. // @homepage https://greasyfork.org/pt-BR/users/186203-bremaya
  7. // @include http://m.facebook.com/*
  8. // @include https://m.facebook.com/*
  9. // @include http://*.m.facebook.com/*
  10. // @include https://*.m.facebook.com/*
  11. // @include http://touch.facebook.com/*
  12. // @include https://touch.facebook.com/*
  13. // @include http://mobile.facebook.com/*
  14. // @include https://mobile.facebook.com/*
  15. // @icon https://brandlogos.net/wp-content/uploads/2021/04/facebook-icon-768x768.png
  16.  
  17.  
  18. //
  19. // @run-at document-start
  20. // @version 0.20220518020400
  21. // ==/UserScript==
  22. (function() {var css = [
  23. "@namespace url(http://www.w3.org/1999/xhtml);",
  24. "#header {",
  25. " position: fixed !important;",
  26. " margin-top: -2px !important;",
  27. " z-index: 99;",
  28. "}",
  29. "",
  30. "#root {",
  31. " margin-top: 78px !important;",
  32. "}"
  33. ].join("\n");
  34. if (typeof GM_addStyle != "undefined") {
  35. GM_addStyle(css);
  36. } else if (typeof PRO_addStyle != "undefined") {
  37. PRO_addStyle(css);
  38. } else if (typeof addStyle != "undefined") {
  39. addStyle(css);
  40. } else {
  41. var node = document.createElement("style");
  42. node.type = "text/css";
  43. node.appendChild(document.createTextNode(css));
  44. var heads = document.getElementsByTagName("head");
  45. if (heads.length > 0) {
  46. heads[0].appendChild(node);
  47. } else {
  48. // no head yet, stick it whereever
  49. document.documentElement.appendChild(node);
  50. }
  51. }
  52. })();