TheDesk Usamin (18.9.0)

This commit is contained in:
Cutls
2019-08-31 23:35:18 +09:00
parent f8f2719c5d
commit 7d02ef2b3e
10 changed files with 140 additions and 20 deletions

View File

@@ -13,6 +13,13 @@ function emojiToggle(reaction) {
if ($("#emoji").hasClass("hide")) {
$("#emoji").removeClass("hide")
$("#right-side").show()
$("#right-side").css("width", "300px")
$("#left-side").css("width","calc(100% - 300px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 300;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#suggest").html("");
if (!localStorage.getItem("emoji_" + acct_id)) {
var html =
@@ -23,9 +30,16 @@ function emojiToggle(reaction) {
}
} else {
$("#poll").addClass("hide")
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#emoji").addClass("hide")
$("#suggest").html("");
$("#right-side").hide()
$("#left-side").css("width","100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}

View File

@@ -18,6 +18,13 @@ input.addEventListener("focus", function () {
$("#suggest").html("");
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
return;
}
@@ -42,11 +49,25 @@ input.addEventListener("focus", function () {
}
if (ehtml != "") {
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
} else {
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
}
$("#suggest").html(ehtml);
@@ -62,6 +83,13 @@ input.addEventListener("focus", function () {
$("#suggest").html("");
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
return;
}
@@ -119,6 +147,13 @@ input.addEventListener("focus", function () {
});
$("#suggest").html(ins);
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
}
@@ -132,12 +167,26 @@ input.addEventListener("focus", function () {
}
});
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#suggest").html(accts);
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
} else {
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
}
});
@@ -172,6 +221,13 @@ function tagInsert(code, del) {
$("#textarea").focus();
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "50%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
$("#suggest").html("");
}