Wider Aviator

Set the width of the Aviator sidebar to ${width}.

  1. // ==UserScript==
  2. // @name Wider Aviator
  3. // @namespace http://prantlf.me/
  4. // @version 1.1
  5. // @description Set the width of the Aviator sidebar to ${width}.
  6. // @author prantlf@gmail.com
  7. // @match https://otcs.dev.ollie.opentext.ai/cs/cs/*
  8. // @match https://ollie.opentext.ai/cs/cs/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. // based on https://greasyfork.org/en/scripts/408637-tall-tiles-in-ollie/
  13. (function () {
  14. 'use strict'
  15.  
  16. function addStyle (content) {
  17. const element = document.createElement('style')
  18. element.type = 'text/css'
  19. element.innerHTML = content
  20. element.setAttribute('data-csui-theme-overrides', 'true')
  21. document.head.appendChild(element)
  22. }
  23.  
  24. const width = '680px';
  25.  
  26. addStyle(`
  27. .binf-widgets .csui-sidepanel.aie-chat-panel .aie-viewer {
  28. width: calc(100% - ${width});
  29. inset-inline-end: ${width};
  30. }
  31.  
  32. .binf-widgets .aie-chat-messages::before {
  33. width: calc(${width} - 23px + var(--aie-scrollbar-width, 16px) - 24px + 11px);
  34. }
  35.  
  36. @supports (-moz-appearance:none) {
  37. .binf-widgets .aie-chat-messages::before {
  38. width: calc(${width} - 23px + var(--aie-scrollbar-width, 16px) - 24px + 18px);
  39. }
  40. }
  41.  
  42. .binf-widgets .aie-chat-post .aie-chat-text .aie-plain {
  43. max-width: calc(${width} - 24px - 48px - 16px - 16px - 7px - 16px);
  44. }
  45.  
  46. .binf-widgets .aie-chat-prompt::after {
  47. width: calc(${width} - 16px - 49px + 24px + 16px + 3px);
  48. }
  49.  
  50. .binf-widgets .aie-chat-panel .csui-sidepanel-container {
  51. width: ${width};
  52. max-width: ${width};
  53. min-width: ${width};
  54. }
  55. `)
  56. }());