diff --git a/common/src/commonMain/kotlin/com/artemchep/keyguard/common/service/placeholder/impl/UrlPlaceholder.kt b/common/src/commonMain/kotlin/com/artemchep/keyguard/common/service/placeholder/impl/UrlPlaceholder.kt index 3cb3d69..aa1a35f 100644 --- a/common/src/commonMain/kotlin/com/artemchep/keyguard/common/service/placeholder/impl/UrlPlaceholder.kt +++ b/common/src/commonMain/kotlin/com/artemchep/keyguard/common/service/placeholder/impl/UrlPlaceholder.kt @@ -55,6 +55,18 @@ class UrlPlaceholder( .let(::io) } + key.startsWith("url:parameter:", ignoreCase = true) -> { + val name = key.substringAfter("url:parameter:") + uuu.parameters[name] + .let(::io) + } + + key.startsWith("base:parameter:", ignoreCase = true) -> { + val name = key.substringAfter("base:parameter:") + uuu.parameters[name] + .let(::io) + } + key.equals("url:userinfo", ignoreCase = true) || key.equals("base:userinfo", ignoreCase = true) -> { val user = uuu.user.orEmpty() diff --git a/wiki/PLACEHOLDERS.md b/wiki/PLACEHOLDERS.md index 71a02fd..a335577 100644 --- a/wiki/PLACEHOLDERS.md +++ b/wiki/PLACEHOLDERS.md @@ -65,6 +65,7 @@ Note: `{base}` supports exactly the same parts as `{url}` and is identical to it | `url:userinfo` | User information: `user:pw` | | `url:username` | Username: `user` | | `url:password` | Password: `pw` | +| `url:parameter:q` | Query parameter with a name `q`: `e` | #### Text transformation