diff --git a/files/classes/comment.py b/files/classes/comment.py index a517e8a03..cce22d1f8 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -53,8 +53,6 @@ class Comment(Base): parent_comment = relationship("Comment", remote_side=[id], viewonly=True) child_comments = relationship("Comment", remote_side=[parent_comment_id], viewonly=True) awards = relationship("AwardRelationship", viewonly=True) - - awards = None def __init__(self, *args, **kwargs): diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 950ae7211..50741bc3a 100755 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -221,7 +221,8 @@ def sanitize(sanitized, noimages=False): for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]: sanitized = sanitized.replace(rd, "https://old.reddit.com/") - + + sanitized = sanitized.replace("old.reddit.com/gallery", "new.reddit.com/gallery") sanitized = re.sub(' (https:\/\/[^ <>]*)', r' \1', sanitized) sanitized = re.sub('

(https:\/\/[^ <>]*)', r'

\1

', sanitized) diff --git a/files/routes/posts.py b/files/routes/posts.py index 3fcbe9297..5ccac7f48 100755 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -503,7 +503,9 @@ def submit_post(v): for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]: url = url.replace(rd, "https://old.reddit.com/") - + + url = url.replace("old.reddit.com/gallery", "new.reddit.com/gallery") + url = url.replace("https://mobile.twitter.com", "https://twitter.com") if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/") diff --git a/files/templates/submission.html b/files/templates/submission.html index dbe14f9d9..1a412193e 100755 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -33,45 +33,73 @@ } } - @media (min-width: 768px) { - .train { - position: absolute; - z-index: 10; - width: 100px; - animation: train 5s linear infinite !important; - } - .trainrev { - animation: trainrev 5s linear infinite !important; - } - } - @media (max-width: 768px) { - .train { + .train1 { position: fixed; z-index: 10; width: 35px; animation: train 3s linear infinite !important; } - .trainrev { - animation: trainrev 3s linear infinite !important; + .train2 { + display: none !important; + } + .train3 { + display: none !important; + } + .train4 { + display: none !important; } } + @media (min-width: 768px) { + .train1 { + position: absolute; + z-index: 10; + width: 100px; + animation: trainrev 5s linear infinite !important; + transform: scaleX(-1); + -webkit-transform: scaleX(-1); + top: 35% + } + .train2 { + position: absolute; + z-index: 10; + width: 100px; + animation: train 5s linear infinite !important; + top: 10% + } + .train3 { + position: absolute; + z-index: 10; + width: 100px; + animation: trainrev 5s linear infinite !important; + transform: scaleX(-1); + -webkit-transform: scaleX(-1); + top: 60% + } + .train4 { + position: absolute; + z-index: 10; + width: 100px; + animation: train 5s linear infinite !important; + top: 85% + } + } - + {% endif %} {% if p.award_count("train") > 1 %} - + {% endif %} {% if p.award_count("train") > 2 %} - + {% endif %} {% if p.award_count("train") > 3 %} - + {% endif %}