forked from MarseyWorld/MarseyWorld
dedup if condition
parent
aee38394f8
commit
e6f0898b54
|
@ -1,5 +1,7 @@
|
|||
const SITE_FULL_IMAGES = document.getElementById('SITE_FULL_IMAGES').value
|
||||
|
||||
const is_chat = (location.pathname == '/chat' || location.pathname == '/old_chat')
|
||||
|
||||
function getMessageFromJsonData(success, json) {
|
||||
let message = success ? "Success!" : "Error, please try again later";
|
||||
let key = success ? "message" : "error";
|
||||
|
@ -506,7 +508,7 @@ function handle_files(input, newfiles) {
|
|||
return
|
||||
}
|
||||
|
||||
if (location.pathname != '/chat' && location.pathname != '/old_chat') {
|
||||
if (!is_chat) {
|
||||
for (const file of newfiles) {
|
||||
insertText(ta, `[${file.name}]`);
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ function populate_speed_emoji_modal(results, textbox)
|
|||
close_inline_speed_emoji_modal()
|
||||
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `:${name}: `)
|
||||
textbox.focus()
|
||||
if (document.location.pathname != '/chat' && document.location.pathname != '/old_chat'){
|
||||
if (!is_chat){
|
||||
markdown(textbox)
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue