forked from MarseyWorld/MarseyWorld
dfdf
parent
81ff918c08
commit
b9a4710aa6
|
@ -189,7 +189,7 @@ def sanitize(text, linkgen=False, flair=False):
|
|||
if flair: emojisize = 20
|
||||
else: emojisize = 30
|
||||
for i in re.finditer(':(.{1,30}?):', sanitized):
|
||||
if path.isfile(f'/d/drama/assets/images/emojis/{i.group(1)}.gif'):
|
||||
if path.isfile(f'./drama/assets/images/emojis/{i.group(1)}.gif'):
|
||||
sanitized = sanitized.replace(f':{i.group(1)}:', f'<img data-toggle="tooltip" title="{i.group(1)}" delay="0" height={emojisize} src="/assets/images/emojis/{i.group(1)}.gif"<span>')
|
||||
|
||||
sanitized = sanitized.replace("https://www.", "https://").replace("https://youtu.be/", "https://youtube.com/embed/").replace("https://music.youtube.com/watch?v=", "https://youtube.com/embed/").replace("/watch?v=", "/embed/").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/embed/")
|
||||
|
|
|
@ -2,7 +2,7 @@ import time
|
|||
import calendar
|
||||
from sqlalchemy.orm import lazyload
|
||||
import imagehash
|
||||
from os import remove, getcwd
|
||||
from os import remove
|
||||
from PIL import Image as IMAGE
|
||||
|
||||
from drama.helpers.wrappers import *
|
||||
|
@ -119,7 +119,6 @@ def flagged_comments(v):
|
|||
@app.route("/admin", methods=["GET"])
|
||||
@admin_level_required(3)
|
||||
def admin_home(v):
|
||||
print(getcwd())
|
||||
with open('./disablesignups', 'r') as f:
|
||||
x = f.read()
|
||||
return render_template("admin/admin_home.html", v=v, x=x)
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
|
||||
{% endfilter %}
|
||||
|
||||
{#<div class="custom-control custom-switch">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="disablesignups" name="disablesignups" {% if x == "yes" %}checked{% endif %} onchange="post('/admin/disablesignups');">
|
||||
<label class="custom-control-label" for="disablesignups">Disable signups</label>
|
||||
</div>#}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue