From 51f17a0d800634fe8d3533f7822f230c2eaeb46f Mon Sep 17 00:00:00 2001 From: Rahul Mishra Date: Sun, 8 Oct 2023 17:47:41 +0530 Subject: [PATCH] fix(syncthing): replace leaky port capture with proper url config (#259) --- styles/syncthing/catppuccin.user.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/styles/syncthing/catppuccin.user.css b/styles/syncthing/catppuccin.user.css index 48dd77e6..5c3baf2f 100644 --- a/styles/syncthing/catppuccin.user.css +++ b/styles/syncthing/catppuccin.user.css @@ -2,7 +2,7 @@ @name Syncthing Catppuccin @namespace github.com/catppuccin/userstyles/styles/syncthing @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/syncthing -@version 0.1.0 +@version 0.1.1 @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/syncthing/catppuccin.user.css @description Soothing pastel theme for Syncthing @author Catppuccin @@ -12,11 +12,15 @@ @var select lightFlavor "Light Flavor" ["latte:Latte*", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha"] @var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"] @var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire*", "sky:Sky", "lavender:Lavender", "subtext0:Gray"] -@var number port "Syncthing Port" 8384 +@var text urls "URL(s) for Syncthing" "127\.0\.0\.1\:8384,localhost\:8384" ==/UserStyle== */ -@-moz-document regexp(%("https?://.*:%d/.*", @port)) +/* + `replace( ," ", "", "g")` is here to remove extra spaces (if any) +*/ + +@-moz-document regexp(replace(replace(%("https?://(%s)/.*", @urls), ",", "|"), " ", "", "g")) { @catppuccin: { @latte: {