From 4b75d43cdf1525c929b378f654e833c217e05733 Mon Sep 17 00:00:00 2001 From: 7dJx1qP <38586902+7dJx1qP@users.noreply.github.com> Date: Mon, 12 Feb 2024 08:34:41 -0500 Subject: [PATCH] add getUIConfig to userscript library --- .../stashUserscriptLibrary7dJx1qP.js | 12 ++++++++++++ .../stashUserscriptLibrary7dJx1qP.yml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/stashUserscriptLibrary7dJx1qP/stashUserscriptLibrary7dJx1qP.js b/plugins/stashUserscriptLibrary7dJx1qP/stashUserscriptLibrary7dJx1qP.js index e3426ce..0d70600 100644 --- a/plugins/stashUserscriptLibrary7dJx1qP/stashUserscriptLibrary7dJx1qP.js +++ b/plugins/stashUserscriptLibrary7dJx1qP/stashUserscriptLibrary7dJx1qP.js @@ -376,6 +376,18 @@ }; return this.callGQL(reqData); } + async getUIConfig() { + const reqData = { + "operationName": "Configuration", + "variables": {}, + "query": `query Configuration { + configuration { + ui + } + }` + }; + return this.callGQL(reqData); + } matchUrl(location, fragment) { const regexp = concatRegexp(new RegExp(location.origin), fragment); this.log.debug(regexp, location.href.match(regexp)); diff --git a/plugins/stashUserscriptLibrary7dJx1qP/stashUserscriptLibrary7dJx1qP.yml b/plugins/stashUserscriptLibrary7dJx1qP/stashUserscriptLibrary7dJx1qP.yml index dd62180..b45d1d6 100644 --- a/plugins/stashUserscriptLibrary7dJx1qP/stashUserscriptLibrary7dJx1qP.yml +++ b/plugins/stashUserscriptLibrary7dJx1qP/stashUserscriptLibrary7dJx1qP.yml @@ -1,6 +1,6 @@ name: 7dJx1qP's Stash Userscript Library description: Exports utility functions and a Stash class that emits events whenever a GQL response is received and whenenever a page navigation change is detected -version: 0.39.0 +version: 0.40.0 url: https://github.com/7dJx1qP/stash-plugins ui: javascript: