types.ts 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 a button to each song in the queue to quickly remove it */
  37. deleteFromQueueButton: boolean;
  38. /** After how many milliseconds to close permanent toasts */
  39. closeToastsTimeout: number;
  40. /** Remove the "si" tracking parameter from links in the share popup */
  41. removeShareTrackingParam: boolean;
  42. /** Enable skipping to a specific time in the video by pressing a number key (0-9) */
  43. numKeysSkipToTime: boolean;
  44. /** Fix spacing issues in the layout */
  45. fixSpacing: boolean;
  46. /** Add a button to the queue to scroll to the currently playing song */
  47. scrollToActiveSongBtn: boolean;
  48. //#SECTION lyrics
  49. /** Add a button to the media controls to open the current song's lyrics on genius.com in a new tab */
  50. geniusLyrics: boolean;
  51. /** Add a button to each song in the queue to quickly open its lyrics page */
  52. lyricsQueueButton: boolean;
  53. //#SECTION misc
  54. /** The console log level - 0 = Debug, 1 = Info */
  55. logLevel: LogLevel;
  56. }