gf
This commit is contained in:
parent
b6075ea9d2
commit
3800619ae2
3 changed files with 9 additions and 8 deletions
|
@ -30,6 +30,8 @@ document.onpaste = function(event) {
|
||||||
document.getElementById('file-upload').setAttribute('required', 'false');
|
document.getElementById('file-upload').setAttribute('required', 'false');
|
||||||
}
|
}
|
||||||
checkForRequired();
|
checkForRequired();
|
||||||
|
document.getElementById('post-url').value = null;
|
||||||
|
localStorage.setItem("post_url", "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -928,14 +928,13 @@ def submit_post(v, sub=None):
|
||||||
|
|
||||||
url = urlunparse(new_url)
|
url = urlunparse(new_url)
|
||||||
|
|
||||||
if SITE != 'localhost':
|
repost = g.db.query(Submission).filter(
|
||||||
repost = g.db.query(Submission).filter(
|
Submission.url.ilike(url),
|
||||||
Submission.url.ilike(url),
|
Submission.deleted_utc == 0,
|
||||||
Submission.deleted_utc == 0,
|
Submission.is_banned == False
|
||||||
Submission.is_banned == False
|
).one_or_none()
|
||||||
).one_or_none()
|
|
||||||
|
|
||||||
if repost: return redirect(repost.permalink)
|
if repost: return redirect(repost.permalink)
|
||||||
|
|
||||||
domain_obj = get_domain(domain)
|
domain_obj = get_domain(domain)
|
||||||
if not domain_obj: domain_obj = get_domain(domain+parsed_url.path)
|
if not domain_obj: domain_obj = get_domain(domain+parsed_url.path)
|
||||||
|
|
|
@ -266,7 +266,7 @@
|
||||||
|
|
||||||
<script src="/static/assets/js/marked.js?a=242"></script>
|
<script src="/static/assets/js/marked.js?a=242"></script>
|
||||||
<script src="/static/assets/js/formatting.js?a=240"></script>
|
<script src="/static/assets/js/formatting.js?a=240"></script>
|
||||||
<script src="/static/assets/js/submit.js?a=247"></script>
|
<script src="/static/assets/js/submit.js?a=248"></script>
|
||||||
{% include "emoji_modal.html" %}
|
{% include "emoji_modal.html" %}
|
||||||
{% include "gif_modal.html" %}
|
{% include "gif_modal.html" %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue