forked from rDrama/rDrama
master
parent
66c04d20be
commit
63c9715d7c
|
@ -65,11 +65,17 @@ function flash(){
|
|||
|
||||
|
||||
socket.on('speak', function(json) {
|
||||
let text = json['text']
|
||||
let text
|
||||
let text_html
|
||||
|
||||
if (slurreplacer != '0') text_html = json['text_censored']
|
||||
else text_html = json['text_html']
|
||||
if (slurreplacer != '0') {
|
||||
text = json['text_censored']
|
||||
text_html = json['text_html_censored']
|
||||
}
|
||||
else {
|
||||
text = json['text']
|
||||
text_html = json['text_html']
|
||||
}
|
||||
|
||||
chatline.classList.remove('chat-mention');
|
||||
if (text_html.includes(`<a href="/id/${vid}">`)){
|
||||
|
|
|
@ -132,8 +132,9 @@ def speak(data, v):
|
|||
"username": v.username,
|
||||
"namecolor": v.name_color,
|
||||
"text": text,
|
||||
"text_censored": censor_slurs(text, 'chat'),
|
||||
"text_html": text_html,
|
||||
"text_censored": censor_slurs(text_html, 'chat'),
|
||||
"text_html_censored": censor_slurs(text_html, 'chat'),
|
||||
"time": int(time.time()),
|
||||
}
|
||||
|
||||
|
|
|
@ -252,8 +252,12 @@
|
|||
</span></span>:
|
||||
<em class="QuotedMessage text-break">
|
||||
{%- if quote_exists -%}
|
||||
{%- if v.slurreplacer -%}
|
||||
{{messages[m['quotes']]['text_censored']}}
|
||||
{%- else -%}
|
||||
{{messages[m['quotes']]['text']}}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</em>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -262,13 +266,21 @@
|
|||
<span class="chat-message text-black text-break">
|
||||
{% if m %}
|
||||
{% if v.slurreplacer %}
|
||||
{{m['text_censored'] | safe}}
|
||||
{{m['text_html_censored'] | safe}}
|
||||
{% else %}
|
||||
{{m['text_html'] | safe}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="text d-none">{% if m %}{{m['text']}}{% endif %}</span>
|
||||
<span class="text d-none">
|
||||
{%- if m -%}
|
||||
{%- if v.slurreplacer -%}
|
||||
{{m['text_censored']}}
|
||||
{%- else -%}
|
||||
{{m['text']}}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</span>
|
||||
<i class="quote btn fas fa-reply ml-auto" data-nonce="{{g.nonce}}" data-onclick="quote(this)"></i>
|
||||
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
|
||||
<i class="btn del delconfirm fas fa-trash-alt"></i>
|
||||
|
|
Loading…
Reference in New Issue