index.ts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { scriptInfo } from "../constants";
  2. export * from "./input";
  3. export * from "./layout";
  4. export * from "./lyrics";
  5. export { initMenu } from "./menu/menu"; // TODO
  6. export * from "./menu/menu_old";
  7. export type FeatureCategory = "input" | "layout" | "lyrics";
  8. /** Contains all possible features with their default values and other config */
  9. export const featInfo = Object.freeze({
  10. //#SECTION input
  11. arrowKeySupport: {
  12. desc: "Arrow keys 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: "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. },
  34. disableBeforeUnloadPopup: {
  35. desc: "Whether to completely disable the popup that sometimes appears before leaving the site",
  36. type: "toggle",
  37. category: "input",
  38. default: false,
  39. },
  40. anchorImprovements: {
  41. desc: "TODO: Make it so middle clicking a song to open it in a new tab is easier",
  42. type: "toggle",
  43. category: "input",
  44. default: true,
  45. },
  46. //#SECTION layout
  47. removeUpgradeTab: {
  48. desc: "Remove the \"Upgrade\" / YT Music Premium tab",
  49. type: "toggle",
  50. category: "layout",
  51. default: true,
  52. },
  53. volumeSliderSize: {
  54. desc: "The width of the volume slider in pixels",
  55. type: "number",
  56. category: "layout",
  57. min: 10,
  58. max: 1000,
  59. step: 5,
  60. unit: "px",
  61. default: 160,
  62. },
  63. volumeSliderStep: {
  64. desc: "Volume slider sensitivity - the smaller this number, the finer the volume control",
  65. type: "slider",
  66. category: "layout",
  67. min: 1,
  68. max: 20,
  69. default: 2,
  70. },
  71. watermarkEnabled: {
  72. desc: `Show a ${scriptInfo.name} watermark under the YTM logo`,
  73. type: "toggle",
  74. category: "layout",
  75. default: true,
  76. },
  77. queueButtons: {
  78. desc: "TODO: Add buttons while hovering over a song in a queue to quickly remove it or open its lyrics",
  79. type: "toggle",
  80. category: "layout",
  81. default: true,
  82. },
  83. dismissPopup: {
  84. desc: "TODO: Automatically dismisses the \"are you still there\" popup",
  85. type: "toggle",
  86. category: "layout",
  87. default: true,
  88. },
  89. //#SECTION lyrics
  90. geniusLyrics: {
  91. desc: "Add a button to the media controls to open the current song's lyrics on genius.com in a new tab",
  92. type: "toggle",
  93. category: "lyrics",
  94. default: true,
  95. },
  96. });