mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[scripts/copy-crosscode-emoji-url] change the order of URL params
This commit is contained in:
parent
f84dbb619c
commit
f62df4016d
1 changed files with 3 additions and 3 deletions
|
@ -68,15 +68,15 @@ chosen_emote = emotes[chosen_index]
|
||||||
emote_url = urllib.parse.urlparse(chosen_emote["url"])
|
emote_url = urllib.parse.urlparse(chosen_emote["url"])
|
||||||
emote_url_query = urllib.parse.parse_qs(emote_url.query)
|
emote_url_query = urllib.parse.parse_qs(emote_url.query)
|
||||||
|
|
||||||
|
if config.getboolean("default", "add_emote_name_to_url", fallback=False):
|
||||||
|
emote_url_query["name"] = [chosen_emote["name"]]
|
||||||
|
|
||||||
default_emote_image_size = config.getint(
|
default_emote_image_size = config.getint(
|
||||||
"default", "default_emote_image_size", fallback=None
|
"default", "default_emote_image_size", fallback=None
|
||||||
)
|
)
|
||||||
if default_emote_image_size is not None:
|
if default_emote_image_size is not None:
|
||||||
emote_url_query["size"] = [str(default_emote_image_size)]
|
emote_url_query["size"] = [str(default_emote_image_size)]
|
||||||
|
|
||||||
if config.getboolean("default", "add_emote_name_to_url", fallback=False):
|
|
||||||
emote_url_query["name"] = [chosen_emote["name"]]
|
|
||||||
|
|
||||||
emote_url_query = urllib.parse.urlencode(emote_url_query, doseq=True)
|
emote_url_query = urllib.parse.urlencode(emote_url_query, doseq=True)
|
||||||
emote_url = urllib.parse.urlunparse(emote_url._replace(query=emote_url_query))
|
emote_url = urllib.parse.urlunparse(emote_url._replace(query=emote_url_query))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue