forked from rDrama/rDrama
parent
97a3f07304
commit
8ba378f6c7
|
@ -7806,7 +7806,3 @@ table.border-0 * {
|
||||||
.inline-modal-option.user-option span {
|
.inline-modal-option.user-option span {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inline-modal-option a {
|
|
||||||
color: var(--black);
|
|
||||||
}
|
|
||||||
|
|
|
@ -99,15 +99,11 @@ function populate_inline_group_modal(results, textbox)
|
||||||
let group_option = document.createElement("div");
|
let group_option = document.createElement("div");
|
||||||
group_option.className = "inline-modal-option group-option " + (i === 1 ? "selected" : "");
|
group_option.className = "inline-modal-option group-option " + (i === 1 ? "selected" : "");
|
||||||
group_option.tabIndex = 0;
|
group_option.tabIndex = 0;
|
||||||
|
|
||||||
let group_option_link = document.createElement("a");
|
|
||||||
group_option_link.href = `/!${name}`
|
|
||||||
|
|
||||||
let group_option_text = document.createElement("span");
|
let group_option_text = document.createElement("span");
|
||||||
|
|
||||||
group_option_text.textContent = name;
|
group_option_text.textContent = name;
|
||||||
|
|
||||||
group_option_link.addEventListener('click', () => {
|
group_option.addEventListener('click', () => {
|
||||||
e.preventDefault();
|
|
||||||
close_inline_emoji_modal()
|
close_inline_emoji_modal()
|
||||||
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `!${name} `)
|
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `!${name} `)
|
||||||
textbox.focus()
|
textbox.focus()
|
||||||
|
@ -115,9 +111,7 @@ function populate_inline_group_modal(results, textbox)
|
||||||
markdown(textbox)
|
markdown(textbox)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
group_option.appendChild(group_option_text);
|
||||||
group_option.appendChild(group_option_link);
|
|
||||||
group_option_link.appendChild(group_option_text);
|
|
||||||
inline_carot_modal.appendChild(group_option);
|
inline_carot_modal.appendChild(group_option);
|
||||||
}
|
}
|
||||||
if (i === 0) inline_carot_modal.style.display = "none";
|
if (i === 0) inline_carot_modal.style.display = "none";
|
||||||
|
|
|
@ -99,10 +99,6 @@ function populate_inline_user_modal(results, textbox)
|
||||||
let user_option = document.createElement("div");
|
let user_option = document.createElement("div");
|
||||||
user_option.className = "inline-modal-option user-option " + (i === 1 ? "selected" : "");
|
user_option.className = "inline-modal-option user-option " + (i === 1 ? "selected" : "");
|
||||||
user_option.tabIndex = 0;
|
user_option.tabIndex = 0;
|
||||||
|
|
||||||
let user_option_link = document.createElement("a");
|
|
||||||
user_option_link.href = `/@${name}`
|
|
||||||
|
|
||||||
let user_option_img = document.createElement("img");
|
let user_option_img = document.createElement("img");
|
||||||
user_option_img.className = "pp20";
|
user_option_img.className = "pp20";
|
||||||
user_option_img.src = `/@${name}/pic`
|
user_option_img.src = `/@${name}/pic`
|
||||||
|
@ -111,8 +107,7 @@ function populate_inline_user_modal(results, textbox)
|
||||||
|
|
||||||
user_option_text.textContent = name;
|
user_option_text.textContent = name;
|
||||||
|
|
||||||
user_option_link.addEventListener('click', (e) => {
|
user_option.addEventListener('click', () => {
|
||||||
e.preventDefault();
|
|
||||||
close_inline_emoji_modal()
|
close_inline_emoji_modal()
|
||||||
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `@${name} `)
|
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `@${name} `)
|
||||||
textbox.focus()
|
textbox.focus()
|
||||||
|
@ -120,10 +115,8 @@ function populate_inline_user_modal(results, textbox)
|
||||||
markdown(textbox)
|
markdown(textbox)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
user_option.appendChild(user_option_img);
|
||||||
user_option.appendChild(user_option_link);
|
user_option.appendChild(user_option_text);
|
||||||
user_option_link.appendChild(user_option_img);
|
|
||||||
user_option_link.appendChild(user_option_text);
|
|
||||||
inline_carot_modal.appendChild(user_option);
|
inline_carot_modal.appendChild(user_option);
|
||||||
}
|
}
|
||||||
if (i === 0) inline_carot_modal.style.display = "none";
|
if (i === 0) inline_carot_modal.style.display = "none";
|
||||||
|
|
Loading…
Reference in New Issue