From 0af7924be9b829420d6aed6b142a0e6d95eebac4 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 10 May 2025 10:56:22 +0200 Subject: [PATCH] add default user agent option --- .config/quickshell/modules/common/ConfigOptions.qml | 4 ++++ .config/quickshell/services/Booru.qml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/modules/common/ConfigOptions.qml b/.config/quickshell/modules/common/ConfigOptions.qml index c0d6758b..f4852626 100644 --- a/.config/quickshell/modules/common/ConfigOptions.qml +++ b/.config/quickshell/modules/common/ConfigOptions.qml @@ -36,6 +36,10 @@ Singleton { } } + property QtObject networking: QtObject { + property string userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" + } + property QtObject osd: QtObject { property int timeout: 1000 } diff --git a/.config/quickshell/services/Booru.qml b/.config/quickshell/services/Booru.qml index e8fa44cf..27a3615e 100644 --- a/.config/quickshell/services/Booru.qml +++ b/.config/quickshell/services/Booru.qml @@ -23,7 +23,7 @@ Singleton { property string failMessage: qsTr("That didn't work. Tips:\n- Check your tags and NSFW settings\n- If you don't have a tag in mind, type a page number") property var responses: [] property int runningRequests: 0 - property var defaultUserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" + property var defaultUserAgent: ConfigOptions.networking.userAgent property var providerList: ["yandere", "konachan", "zerochan", "danbooru", "gelbooru", "waifu.im"] property var providers: { "system": { "name": "System" },