fsd
This commit is contained in:
parent
7bbc1d75ab
commit
08203a791d
3 changed files with 11 additions and 7 deletions
|
@ -113,12 +113,16 @@ function checkRepost(t) {
|
||||||
form.append("url", url);
|
form.append("url", url);
|
||||||
|
|
||||||
xhr.onload=function(){
|
xhr.onload=function(){
|
||||||
const permalink = xhr.response
|
try {data = JSON.parse(xhr.response)}
|
||||||
console.log(permalink)
|
catch(e) {console.log(e)}
|
||||||
|
|
||||||
|
if (data && data["permalink"]) {
|
||||||
|
const permalink = data["permalink"]
|
||||||
if (permalink) {
|
if (permalink) {
|
||||||
system.innerHTML = `<span class='text-danger'>This is a repost of <a href=${permalink}>${permalink}</a></span>`;
|
system.innerHTML = `<span class='text-danger'>This is a repost of <a href=${permalink}>${permalink}</a></span>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
xhr.send(form)
|
xhr.send(form)
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -854,8 +854,8 @@ def api_is_repost():
|
||||||
Submission.deleted_utc == 0,
|
Submission.deleted_utc == 0,
|
||||||
Submission.is_banned == False
|
Submission.is_banned == False
|
||||||
).first()
|
).first()
|
||||||
if repost: return repost.permalink
|
if repost: return {'permalink': repost.permalink}
|
||||||
else: return ''
|
else: return {'permalink': ''}
|
||||||
|
|
||||||
@app.post("/submit")
|
@app.post("/submit")
|
||||||
@app.post("/h/<sub>/submit")
|
@app.post("/h/<sub>/submit")
|
||||||
|
|
|
@ -268,7 +268,7 @@
|
||||||
|
|
||||||
<script src="/assets/js/marked.js?v=250"></script>
|
<script src="/assets/js/marked.js?v=250"></script>
|
||||||
<script src="/assets/js/formatting.js?v=240"></script>
|
<script src="/assets/js/formatting.js?v=240"></script>
|
||||||
<script src="/assets/js/submit.js?v=252"></script>
|
<script src="/assets/js/submit.js?v=253"></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