dasdsa
parent
cb2fc90770
commit
72e2af12e0
|
@ -16,8 +16,8 @@
|
||||||
{% if success %}
|
{% if success %}
|
||||||
<script>
|
<script>
|
||||||
history.pushState(null, null, '{{p.permalink | full_link}}');
|
history.pushState(null, null, '{{p.permalink | full_link}}');
|
||||||
window.localStorage.setItem("post_title", "")
|
localStorage.setItem("post_title", "")
|
||||||
window.localStorage.setItem("post_text", "")
|
localStorage.setItem("post_text", "")
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -878,7 +878,7 @@
|
||||||
const comments = JSON.parse(localStorage.getItem("comment-counts")) || {}
|
const comments = JSON.parse(localStorage.getItem("comment-counts")) || {}
|
||||||
const newTotal = {{p.comment_count}} || ((comments['{{p.id}}'] || {c: 0}).c + 1)
|
const newTotal = {{p.comment_count}} || ((comments['{{p.id}}'] || {c: 0}).c + 1)
|
||||||
comments['{{p.id}}'] = {c: newTotal, t: Date.now()}
|
comments['{{p.id}}'] = {c: newTotal, t: Date.now()}
|
||||||
window.localStorage.setItem("comment-counts", JSON.stringify(comments))
|
localStorage.setItem("comment-counts", JSON.stringify(comments))
|
||||||
{% endif %}
|
{% endif %}
|
||||||
})()
|
})()
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -195,9 +195,9 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let fetched_title = window.localStorage.getItem("post_title")
|
let fetched_title = localStorage.getItem("post_title")
|
||||||
document.getElementById('post-title').value = fetched_title
|
document.getElementById('post-title').value = fetched_title
|
||||||
let fetched_text = window.localStorage.getItem("post_text")
|
let fetched_text = localStorage.getItem("post_text")
|
||||||
document.getElementById('post-text').value = fetched_text
|
document.getElementById('post-text').value = fetched_text
|
||||||
|
|
||||||
function checkForRequired() {
|
function checkForRequired() {
|
||||||
|
|
|
@ -698,7 +698,7 @@
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/userpage.js?a=205"></script>
|
<script src="/static/assets/js/userpage.js?a=206"></script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -114,5 +114,5 @@
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/userpage.js?a=205"></script>
|
<script src="/static/assets/js/userpage.js?a=206"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -48,5 +48,5 @@
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/userpage.js?a=205"></script>
|
<script src="/static/assets/js/userpage.js?a=206"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue