mirror of https://gitlab.com/bashrc2/epicyon
Remove SHOW MORE when opening cw
parent
b4290f5f1a
commit
8f896200d5
|
@ -457,7 +457,8 @@ def html_new_post(edit_post_params: {},
|
|||
bold_reading, dogwhistles,
|
||||
minimize_all_images, None,
|
||||
buy_sites, auto_cw_cache)
|
||||
new_post_text += open_content_warning(replied_to_post)
|
||||
new_post_text += \
|
||||
open_content_warning(replied_to_post, translate)
|
||||
# about the author
|
||||
if has_object_dict(post_json_object):
|
||||
if post_json_object['object'].get('attributedTo'):
|
||||
|
|
|
@ -285,10 +285,11 @@ def get_content_warning_button(post_id: str, translate: {},
|
|||
'</div></details>\n'
|
||||
|
||||
|
||||
def open_content_warning(text: str) -> str:
|
||||
def open_content_warning(text: str, translate: {}) -> str:
|
||||
"""Opens content warning when replying to a post with a cw
|
||||
"""
|
||||
return text.replace('<details>', '<div>').replace('</details>', '</div>')
|
||||
text = text.replace('<details>', '').replace('</details>', '')
|
||||
return text.replace(translate['SHOW MORE'], '', 1)
|
||||
|
||||
|
||||
def _set_actor_property_url(actor_json: {},
|
||||
|
|
Loading…
Reference in New Issue