types.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 configuration */
  8. export interface FeatureConfig {
  9. //#SECTION input
  10. /** Arrow keys skip forwards and backwards by 10 seconds */
  11. arrowKeySupport: boolean;
  12. /** Add F9 as a hotkey to switch between the YT and YTM sites on a video / song */
  13. switchBetweenSites: boolean;
  14. /** The hotkey that needs to be pressed to initiate the site switch */
  15. switchSitesHotkey: {
  16. key: string;
  17. shift: boolean;
  18. ctrl: boolean;
  19. meta: boolean;
  20. };
  21. /** Whether to completely disable the popup that sometimes appears before leaving the site */
  22. disableBeforeUnloadPopup: boolean;
  23. /** Make it so middle clicking a song to open it in a new tab (through thumbnail and song title) is easier */
  24. anchorImprovements: boolean;
  25. //#SECTION layout
  26. /** Remove the \"Upgrade\" / YT Music Premium tab */
  27. removeUpgradeTab: boolean;
  28. /** Add a percentage label to the volume slider */
  29. volumeSliderLabel: 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. /** After how many milliseconds to close permanent toasts */
  39. closeToastsTimeout: number;
  40. //#SECTION lyrics
  41. /** Add a button to the media controls to open the current song's lyrics on genius.com in a new tab */
  42. geniusLyrics: boolean;
  43. // /** Add a button to each song in the queue to allow for quickly pre-opening lyrics pages of upcoming songs */
  44. // geniusLyricsInQueue: boolean;
  45. }