resize-o-don

resizable columns in mastodon

安装此脚本
作者推荐脚本

您可能也喜欢rearrange-O-Don

安装此脚本
  1. // ==UserScript==
  2. // @name resize-o-don
  3. // @license DWTFYW
  4. // @namespace http://pureandapplied.com.au/resizodon
  5. // @version 0.4.3
  6. // @description resizable columns in mastodon
  7. // @author stib
  8. // @match https://*.social/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=aus.social
  10. // @run-at document-start
  11. // @grant GM_addStyle
  12. // ==/UserScript==
  13.  
  14. (function() {var css = [
  15. " .columns-area .column{",
  16. " resize: horizontal;",
  17. " max-width: 100% !important;",
  18. " flexShrink: 0;",
  19. " }",
  20. " .column:last-child {",
  21. " resize: horizontal !important;",
  22. " flex: 1 1 auto !important;",
  23. " }",
  24. " .drawer{",
  25. " resize: horizontal !important;",
  26. " }",
  27. "}"
  28. ].join("\n");
  29. if (typeof GM_addStyle != "undefined") {
  30. GM_addStyle(css);
  31. } else if (typeof PRO_addStyle != "undefined") {
  32. PRO_addStyle(css);
  33. } else if (typeof addStyle != "undefined") {
  34. addStyle(css);
  35. } else {
  36.  
  37. var node = document.createElement("style");
  38. node.type = "text/css";
  39. node.appendChild(document.createTextNode(css));
  40. var heads = document.getElementsByTagName("head");
  41. if (heads.length > 0) {
  42. heads[0].appendChild(node);
  43. } else {
  44. // no head yet, stick it whereever
  45. document.documentElement.appendChild(node);
  46. }
  47. }
  48. })();