index.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import { scriptInfo } from "../constants";
  2. export * from "./input";
  3. export * from "./layout";
  4. export * from "./lyrics";
  5. export { initMenu } from "./menu/menu";
  6. export * from "./menu/menu_old";
  7. export type FeatInfoKeys = keyof typeof featInfo;
  8. /** Contains all possible features with their default values and other config */
  9. export const featInfo = {
  10. //#SECTION input
  11. arrowKeySupport: {
  12. desc: "Arrow keys to skip forwards and backwards by 10 seconds",
  13. type: "toggle",
  14. category: "input",
  15. default: true,
  16. },
  17. switchBetweenSites: {
  18. desc: "Add F9 as a hotkey to switch between the YT and YTM sites on a video / song",
  19. type: "toggle",
  20. category: "input",
  21. default: true,
  22. },
  23. switchSitesHotkey: {
  24. desc: "TODO(v1.1): Which hotkey needs to be pressed to switch sites?",
  25. type: "hotkey",
  26. category: "input",
  27. default: {
  28. key: "F9",
  29. shift: false,
  30. ctrl: false,
  31. meta: false,
  32. },
  33. hidden: true,
  34. },
  35. disableBeforeUnloadPopup: {
  36. desc: "Disable the confirmation popup that sometimes appears when trying to leave the site",
  37. type: "toggle",
  38. category: "input",
  39. default: false,
  40. },
  41. anchorImprovements: {
  42. desc: "TODO:FIXME: Add link elements all over the page so things can be opened in a new tab easier",
  43. type: "toggle",
  44. category: "input",
  45. default: true,
  46. },
  47. //#SECTION layout
  48. removeUpgradeTab: {
  49. desc: "Remove the Upgrade / Premium tab",
  50. type: "toggle",
  51. category: "layout",
  52. default: true,
  53. },
  54. volumeSliderLabel: {
  55. desc: "Add a percentage label to the volume slider",
  56. type: "toggle",
  57. category: "layout",
  58. default: true,
  59. },
  60. volumeSliderSize: {
  61. desc: "The width of the volume slider in pixels",
  62. type: "number",
  63. category: "layout",
  64. min: 50,
  65. max: 500,
  66. step: 5,
  67. default: 150,
  68. unit: "px",
  69. },
  70. volumeSliderStep: {
  71. desc: "Volume slider sensitivity (by how little percent the volume can be changed at a time)",
  72. type: "slider",
  73. category: "layout",
  74. min: 1,
  75. max: 25,
  76. default: 2,
  77. unit: "%",
  78. },
  79. watermarkEnabled: {
  80. desc: `Show a ${scriptInfo.name} watermark under the site logo that opens this config menu`,
  81. type: "toggle",
  82. category: "layout",
  83. default: true,
  84. },
  85. // TODO(v1.1): Make each button configurable
  86. queueButtons: {
  87. desc: "Add buttons to each song in the queue to quickly open their lyrics or remove them from the queue",
  88. type: "toggle",
  89. category: "layout",
  90. default: true,
  91. },
  92. closeToastsTimeout: {
  93. desc: "After how many seconds to close permanent notifications - 0 to only close them manually (default behavior)",
  94. type: "number",
  95. category: "layout",
  96. min: 0,
  97. max: 30,
  98. step: 0.5,
  99. default: 0,
  100. unit: "s",
  101. },
  102. //#SECTION lyrics
  103. geniusLyrics: {
  104. desc: "Add a button to the media controls of the currently playing song to open its lyrics on genius.com",
  105. type: "toggle",
  106. category: "lyrics",
  107. default: true,
  108. },
  109. } as const;