aboutsummaryrefslogtreecommitdiff
path: root/static/js/posts.js
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 12:57:26 -0300
committerKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 12:57:26 -0300
commit7027fdd87011962b2b177342a462d54737e03501 (patch)
tree51d867257e293190b18c1064b47b5bfb13bdbbe0 /static/js/posts.js
parentd460fa6316d3db4e68e6b4d4c7ee2d02d6505304 (diff)
theme newpost at top of page
Diffstat (limited to 'static/js/posts.js')
-rw-r--r--static/js/posts.js21
1 files changed, 4 insertions, 17 deletions
diff --git a/static/js/posts.js b/static/js/posts.js
index 455e7ea..75244fa 100644
--- a/static/js/posts.js
+++ b/static/js/posts.js
@@ -2,29 +2,16 @@ function startNewPost(){
var el = document.getElementById("newpostbtn");
el.style="display:none;";
el.setAttribute("state", "1");
- document.getElementById("newpost").style = "display: block;";
+ document.getElementById("newpost").style = "";
+ sessionStorage.setItem("newpostState", true);
}
function stopNewPost(){
var el = document.getElementById("newpostbtn");
el.style="display:block;";
el.setAttribute("state", "0");
- document.getElementById("newpost").style = "display: hidden;";
-}
-
-function newpost()
-{
- var state = document.getElementById("newpostbtn").getAttribute("state");
- if(state === "0")
- {
- startNewPost();
- sessionStorage.setItem("newpostState", true);
- }
- else
- {
- stopNewPost();
- sessionStorage.setItem("newpostState", false);
- }
+ document.getElementById("newpost").style = "display: none;";
+ sessionStorage.setItem("newpostState", false);
}
function shortURL(actorName, url)