Sv443 5 месяцев назад
Родитель
Сommit
4469dff790
4 измененных файлов с 4 добавлено и 2 удалено
  1. 1 0
      assets/translations/de-DE.json
  2. 1 0
      assets/translations/en-US.json
  3. 1 1
      contributing.md
  4. 1 1
      src/features/volume.ts

+ 1 - 0
assets/translations/de-DE.json

@@ -288,6 +288,7 @@
     "feature_desc_rememberSongTimeReduction": "Wie viele Sekunden abgezogen werden sollen, wenn ein gespeicherter Song wiederhergestellt wird",
     "feature_helptext_rememberSongTimeReduction": "Wenn die Zeit eines Songs, die gespeichert wurde, wiederhergestellt wird, wird diese Anzahl von Sekunden von der gespeicherten Zeit abgezogen, damit du den Teil, der unterbrochen wurde, erneut hören kannst.",
     "feature_desc_rememberSongTimeMinPlayTime": "Mindestanzahl an Sekunden, die ein Song gespielt werden muss, damit die Zeit gespeichert wird",
+    "feature_desc_aboveQueueBtnsSticky": "Positioniere das Element, in dem die Knöpfe über der Wiedergabeliste sind, immer am oberen Rand",
 
     "feature_desc_arrowKeySupport": "Benutze die Pfeiltasten um vor- und zurückzuspulen",
     "feature_helptext_arrowKeySupport": "Normalerweise kannst du nur in 10 Sekunden Schritten vor- und zurückspulen, indem du die Tasten \"H\" und \"L\" benutzt. Diese Funktion ermöglicht es dir, auch die Pfeiltasten zu benutzen.\nUm die Anzahl der Sekunden zu ändern, um die gespult werden soll, benutze die Option unten.",

+ 1 - 0
assets/translations/en-US.json

@@ -288,6 +288,7 @@
     "feature_desc_rememberSongTimeReduction": "How many seconds to subtract when restoring the time of a remembered song",
     "feature_helptext_rememberSongTimeReduction": "When restoring the time of a song that was remembered, this amount of seconds will be subtracted from the remembered time so you have more context when listening to the part that was interrupted again.",
     "feature_desc_rememberSongTimeMinPlayTime": "Minimum amount of seconds a song needs to be played for its time to be remembered",
+    "feature_desc_aboveQueueBtnsSticky": "Always position the element containing the buttons above the queue at the top of the list",
 
     "feature_desc_arrowKeySupport": "Use arrow keys to skip forwards and backwards in the currently playing song",
     "feature_helptext_arrowKeySupport": "Normally you can only skip forwards and backwards by a fixed 10 second interval with the keys \"H\" and \"L\". This feature allows you to use the arrow keys too.\nTo change the amount of seconds to skip, use the option below.",

+ 1 - 1
contributing.md

@@ -281,7 +281,7 @@ These are the ways to interact with BetterYTM; through constants, events and glo
   You can find all properties that are available and their types in the `declare global` block of [`src/types.ts`](src/types.ts)
 
 - Dynamic interaction is done through events that are dispatched on the `unsafeWindow` object.  
-  They all have the prefix `bytm:eventName` and are all dispatched with the `CustomEvent` interface, meaning their data can be read using the `detail` property.  
+  They all have the prefix `bytm:eventName` and are all dispatched with the [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) interface, meaning their data can be read using the `detail` property.  
   You can find all events that are available and their types in [`src/interface.ts`](src/interface.ts)  
     
   Additionally BetterYTM has an internal system called SiteEvents. They are dispatched using the format `bytm:siteEvent:eventName`  

+ 1 - 1
src/features/volume.ts

@@ -77,7 +77,7 @@ function initScrollStep(volSliderCont: HTMLDivElement, sliderElem: HTMLInputElem
       // cancels all the other events that would be fired
       e.stopImmediatePropagation();
 
-      const delta = Number((e as WheelEvent).deltaY ?? (e as CustomEvent<number | undefined>).detail ?? 1);
+      const delta = Number((e as WheelEvent).deltaY ?? (e as CustomEvent<number | undefined>)?.detail ?? 1);
       if(isNaN(delta))
         return warn("Invalid scroll delta:", delta);