diff --git a/client/src/app.vue b/client/src/app.vue index e908ebd1..59b68adb 100644 --- a/client/src/app.vue +++ b/client/src/app.vue @@ -206,6 +206,11 @@ return Math.max(0.0, Math.min(!isNaN(numberParam) ? numberParam * 100 : 100, 100)) } + get scroll() { + const numberParam = parseInt(new URL(location.href).searchParams.get('scroll') || '', 10) + return Math.max(1, Math.min(!isNaN(numberParam) ? numberParam : 10, 100)) + } + get isCastMode() { return !!new URL(location.href).searchParams.get('cast') } @@ -229,6 +234,13 @@ } } + @Watch('scroll', { immediate: true }) + onScroll(scroll: number) { + if (new URL(location.href).searchParams.has('scroll')) { + this.$accessor.settings.setScroll(scroll) + } + } + @Watch('hideControls', { immediate: true }) onHideControls(enabled: boolean) { if (enabled) { diff --git a/webpage/docs/customization/ui.md b/webpage/docs/customization/ui.md index a3629460..cc654cbf 100644 --- a/webpage/docs/customization/ui.md +++ b/webpage/docs/customization/ui.md @@ -52,6 +52,7 @@ You can use query parameters to customize the Neko web interface. These paramete | `?cast=1` | Hides all controls and shows only the video. | | `?embed=1` | Hides most additional components and shows only the video. | | `?volume=<0-1>` | Sets the volume to the given value (between 0 and 1). | +| `?scroll=<1-100>` | Sets the scroll sensitivity to the given value (1-100). | | `?lang=` | Sets the language to the given value. | | `?show_side=1` | Shows the sidebar on startup. | | `?mute_chat=1` | Mutes the chat on startup. |