forked from rDrama/rDrama
master
parent
e5343fb7a8
commit
47a4bdfa95
|
@ -1,11 +0,0 @@
|
||||||
history.pushState(null, null, `/post/${pid}`);
|
|
||||||
localStorage.setItem("post-title", "")
|
|
||||||
localStorage.setItem("post-text", "")
|
|
||||||
localStorage.setItem("post-url", "")
|
|
||||||
localStorage.setItem("sub", "")
|
|
||||||
|
|
||||||
localStorage.setItem("post-notify", true)
|
|
||||||
localStorage.setItem("post-new", false)
|
|
||||||
localStorage.setItem("post-nsfw", false)
|
|
||||||
localStorage.setItem("post-private", false)
|
|
||||||
localStorage.setItem("post-ghost", false)
|
|
|
@ -241,6 +241,17 @@ function submit(form) {
|
||||||
uploadfilelist.classList.add("d-none")
|
uploadfilelist.classList.add("d-none")
|
||||||
if (xhr.status >= 200 && xhr.status < 300) {
|
if (xhr.status >= 200 && xhr.status < 300) {
|
||||||
const post_id = JSON.parse(xhr.response)['post_id'];
|
const post_id = JSON.parse(xhr.response)['post_id'];
|
||||||
|
|
||||||
|
localStorage.setItem("post-title", "")
|
||||||
|
localStorage.setItem("post-text", "")
|
||||||
|
localStorage.setItem("post-url", "")
|
||||||
|
localStorage.setItem("sub", "")
|
||||||
|
localStorage.setItem("post-notify", true)
|
||||||
|
localStorage.setItem("post-new", false)
|
||||||
|
localStorage.setItem("post-nsfw", false)
|
||||||
|
localStorage.setItem("post-private", false)
|
||||||
|
localStorage.setItem("post-ghost", false)
|
||||||
|
|
||||||
location.href = "/post/" + post_id
|
location.href = "/post/" + post_id
|
||||||
} else {
|
} else {
|
||||||
submitButton.disabled = false;
|
submitButton.disabled = false;
|
||||||
|
|
|
@ -371,10 +371,6 @@
|
||||||
<script defer src="{{'js/new_comments.js' | asset}}"></script>
|
<script defer src="{{'js/new_comments.js' | asset}}"></script>
|
||||||
<script defer src="{{'js/submission.js' | asset}}"></script>
|
<script defer src="{{'js/submission.js' | asset}}"></script>
|
||||||
|
|
||||||
{% if success %}
|
|
||||||
<script defer src="{{'js/submission_success.js' | asset}}"></script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if fart and not (v and v.has_badge(128)) %}
|
{% if fart and not (v and v.has_badge(128)) %}
|
||||||
<script defer src="{{'js/fart.js' | asset}}"></script>
|
<script defer src="{{'js/fart.js' | asset}}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue