Add: quote

This commit is contained in:
Cutls
2019-09-08 01:33:01 +09:00
parent bc5be9449d
commit 3b69c4e7c1
16 changed files with 80 additions and 94 deletions

View File

@@ -79,6 +79,10 @@ function post(mode, postvis) {
if (media) {
toot.media_ids = media.split(",");
}
var quote = $("#quote").val();
if (quote) {
toot.quote_id = quote;
}
if ($("#nsfw").hasClass("nsfw-avail")) {
var nsfw = "true";
toot.sensitive = nsfw;
@@ -243,6 +247,7 @@ function clear() {
}
$("#textarea").attr("placeholder", lang.lang_toot);
$("#reply").val("");
$("#quote").val("");
$("#media").val("");
var cwt = localStorage.getItem("cw-text");
if (cwt) {

View File

@@ -57,6 +57,21 @@ function qt(id, acct_id, at, url) {
html = html.replace(/<\/p>/, "\n");
html = $.strip_tags(html);
$("#textarea").val("\n" + "@" + at + " " + html + "\n" + url);
} else if (qt == "apiQuote") {
clear();
localStorage.setItem("nohide", true);
show();
$("#quote").val(id);
$("#post-acct-sel").val(acct_id);
$("#post-acct-sel").prop("disabled", true);
$('select').formSelect();
$("#textarea").attr("placeholder", lang.lang_usetxtbox_reply);
$("#textarea").focus();
var profimg = localStorage.getItem("prof_" + acct_id);
if (!profimg) {
profimg = "../../img/missing.svg";
}
$("#acct-sel-prof").attr("src", profimg);
}
$("#post-acct-sel").val(acct_id);
$('select').formSelect();