fix
This commit is contained in:
parent
1a30b44eaa
commit
3cbab619c2
2 changed files with 12 additions and 13 deletions
|
@ -237,13 +237,13 @@ document.onpaste = function(event) {
|
|||
}
|
||||
|
||||
function markdown(first, second) {
|
||||
var input = document.getElementById(first).value;
|
||||
let input = document.getElementById(first).value;
|
||||
|
||||
var emojis = Array.from(input.matchAll(/:(.{1,30}?):/gi))
|
||||
const emojis = Array.from(input.matchAll(/:(.{1,30}?):/gi))
|
||||
if(emojis != null){
|
||||
for(i = 0; i < emojis.length; i++){
|
||||
var emoji = emojis[i][0]
|
||||
var remoji = emoji.replace(/:/g,'');
|
||||
const emoji = emojis[i][0]
|
||||
const remoji = emoji.replace(/:/g,'');
|
||||
if (remoji.startsWith("!"))
|
||||
{
|
||||
input = input.replace(emoji, "<img height=30 src='/assets/images/emojis/" + remoji.substring(1) + ".webp' class='mirrored'>")
|
||||
|
@ -256,11 +256,11 @@ function markdown(first, second) {
|
|||
|
||||
if (!first.includes('edit'))
|
||||
{
|
||||
var options = Array.from(input.matchAll(/\s*\$\$([^\$\n]+)\$\$\s*/gi))
|
||||
let options = Array.from(input.matchAll(/\s*\$\$([^\$\n]+)\$\$\s*/gi))
|
||||
if(options != null){
|
||||
for(i = 0; i < options.length; i++){
|
||||
var option = options[i][0];
|
||||
var option2 = option.replace(/\$\$/g, '').replace(/\n/g, '')
|
||||
const option = options[i][0];
|
||||
const option2 = option.replace(/\$\$/g, '').replace(/\n/g, '')
|
||||
input = input.replace(option, '');
|
||||
input += '<div class="custom-control"><input type="checkbox" class="custom-control-input" id="' + option2 + '"><label class="custom-control-label" for="' + option2 + '">' + option2 + ' - <a>0 votes</a></label></div>';
|
||||
}
|
||||
|
@ -272,13 +272,12 @@ function markdown(first, second) {
|
|||
|
||||
function charLimit(form, text) {
|
||||
|
||||
var input = document.getElementById(form);
|
||||
const input = document.getElementById(form);
|
||||
const text = document.getElementById(text);
|
||||
|
||||
var text = document.getElementById(text);
|
||||
const length = input.value.length;
|
||||
|
||||
var length = input.value.length;
|
||||
|
||||
var maxLength = input.getAttribute("maxlength");
|
||||
const maxLength = input.getAttribute("maxlength");
|
||||
|
||||
if (length >= maxLength) {
|
||||
text.style.color = "#E53E3E";
|
||||
|
|
|
@ -359,7 +359,7 @@
|
|||
<i class="fas fa-user-times text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Shadowbanned by @{{c.author.shadowbanned}}"></i>
|
||||
{% endif %}
|
||||
{% if c.is_pinned %}
|
||||
<i id='pinned-{{c.id}}' class="fas fa-thumbtack fa-rotate--45 text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Pinned {% if c.is_pinned.startswith('t:') %}until {{c.is_pinned[2:]}}{% else %}by @{{c.is_pinned}}{%endif%}"></i>
|
||||
<i id='pinned-{{c.id}}' onmouseover="timeStamp({{c.created_utc}})" class="fas fa-thumbtack fa-rotate--45 text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Pinned {% if c.is_pinned.startswith('t:') %}until {{c.is_pinned[2:]}}{% else %}by @{{c.is_pinned}}{%endif%}"></i>
|
||||
{% endif %}
|
||||
{% if c.distinguish_level %}
|
||||
<i class="fas fa-broom text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="{{'SITE_NAME' | app_config}} Admin, speaking officially"></i>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue