types.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /** Env object passed to webpack.config.js */
  2. export type WebpackEnv = Partial<Record<"mode", "production" | "development">> & Record<"WEBPACK_BUNDLE" | "WEBPACK_BUILD", boolean>;
  3. /** 0 = Debug, 1 = Info */
  4. export type LogLevel = 0 | 1;
  5. /** Which domain this script is currently running on */
  6. export type Domain = "yt" | "ytm";
  7. /** Feature category to be used in the menu for grouping features */
  8. export type FeatureCategory = "input" | "layout" | "lyrics";
  9. /** Feature configuration */
  10. export interface FeatureConfig {
  11. //#SECTION input
  12. /** Arrow keys skip forwards and backwards by 10 seconds */
  13. arrowKeySupport: boolean;
  14. /** Add F9 as a hotkey to switch between the YT and YTM sites on a video / song */
  15. switchBetweenSites: boolean;
  16. /** TODO(v1.1): The hotkey that needs to be pressed to initiate the site switch */
  17. switchSitesHotkey: {
  18. key: string;
  19. shift: boolean;
  20. ctrl: boolean;
  21. meta: boolean;
  22. };
  23. /** Whether to completely disable the popup that sometimes appears before leaving the site */
  24. disableBeforeUnloadPopup: boolean;
  25. /** TODO: Make it so middle clicking a song to open it in a new tab (through thumbnail and song title) is easier */
  26. anchorImprovements: boolean;
  27. //#SECTION layout
  28. /** Remove the \"Upgrade\" / YT Music Premium tab */
  29. removeUpgradeTab: boolean;
  30. /** The width of the volume slider in pixels */
  31. volumeSliderSize: number;
  32. /** Volume slider sensitivity - the smaller this number, the finer the volume control */
  33. volumeSliderStep: number;
  34. /** Show a BetterYTM watermark under the YTM logo */
  35. watermarkEnabled: boolean;
  36. /** Add buttons while hovering over a song in a queue to quickly remove it or open its lyrics */
  37. queueButtons: boolean;
  38. //#SECTION lyrics
  39. /** Add a button to the media controls to open the current song's lyrics on genius.com in a new tab */
  40. geniusLyrics: boolean;
  41. // /** Add a button to each song in the queue to allow for quickly pre-opening lyrics pages of upcoming songs */
  42. // geniusLyricsInQueue: boolean;
  43. }