Merge branch 'frost' into debooterstrap

master
justcool393 2022-10-29 20:07:18 -07:00 committed by GitHub
commit 74d3c325d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 289 additions and 157 deletions

View File

@ -26,7 +26,7 @@ export function Username({ avatar, color, name, hat = "" }: UsernameProps) {
style={{ color: `#${color}` }} style={{ color: `#${color}` }}
target="_blank" target="_blank"
href={`/@${name}`} href={`/@${name}`}
rel="noopener noreferrer" rel="nofollow noopener"
> >
{name} {name}
</a> </a>

View File

@ -110,8 +110,6 @@ def before_request():
@app.after_request @app.after_request
def after_request(response): def after_request(response):
response.headers.add("Strict-Transport-Security", "max-age=31536000")
response.headers.add("X-Frame-Options", "deny")
if response.status_code < 400: if response.status_code < 400:
g.db.commit() g.db.commit()
g.db.close() g.db.close()

View File

@ -3477,7 +3477,6 @@ small, .small {
border-bottom: 0.1px solid var(--gray-400); border-bottom: 0.1px solid var(--gray-400);
} }
.card-thumbnail { .card-thumbnail {
z-index: 3;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -5557,8 +5556,16 @@ audio, video {
text-transform: uppercase; text-transform: uppercase;
} }
#sidebar--rules--list { .sidebar--rules-list {
margin-left: 0;
padding-left: 0; padding-left: 0;
}
.sidebar--rules-list--rdrama li {
margin-bottom: 1rem;
}
.sidebar--rules-list--wpd {
font-size: 0.95rem; font-size: 0.95rem;
} }
@ -5844,11 +5851,6 @@ blockquote + blockquote, div > blockquote:first-child, blockquote:last-child {
margin-top: 0 !important; margin-top: 0 !important;
} }
#searchparams-dropdown {
z-index: 1;
}
.contain { .contain {
-o-object-fit: contain; -o-object-fit: contain;
object-fit: contain; object-fit: contain;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,8 @@
from sqlalchemy import * from sqlalchemy import *
from files.__main__ import Base from files.__main__ import Base
import time import time
from files.helpers.lazy import lazy
import json
CASINO_GAME_KINDS = ['blackjack', 'slots', 'roulette'] CASINO_GAME_KINDS = ['blackjack', 'slots', 'roulette']
@ -24,3 +26,8 @@ class Casino_Game(Base):
def __repr__(self): def __repr__(self):
return f"<CasinoGame(id={self.id})>" return f"<CasinoGame(id={self.id})>"
@property
@lazy
def game_state_json(self):
return json.loads(self.game_state)

View File

@ -64,6 +64,9 @@ class Comment(Base):
ban_reason = Column(String) ban_reason = Column(String)
wordle_result = Column(String) wordle_result = Column(String)
treasure_amount = Column(String) treasure_amount = Column(String)
slots_result = Column(String)
blackjack_result = Column(String)
casino_game_id = Column(Integer, ForeignKey("casino_games.id"))
oauth_app = relationship("OauthApp") oauth_app = relationship("OauthApp")
post = relationship("Submission", back_populates="comments") post = relationship("Submission", back_populates="comments")
@ -73,6 +76,7 @@ class Comment(Base):
awards = relationship("AwardRelationship", order_by="AwardRelationship.awarded_utc.desc()", back_populates="comment") awards = relationship("AwardRelationship", order_by="AwardRelationship.awarded_utc.desc()", back_populates="comment")
flags = relationship("CommentFlag", order_by="CommentFlag.created_utc") flags = relationship("CommentFlag", order_by="CommentFlag.created_utc")
options = relationship("CommentOption", order_by="CommentOption.id") options = relationship("CommentOption", order_by="CommentOption.id")
casino_game = relationship("Casino_Game")
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
if "created_utc" not in kwargs: if "created_utc" not in kwargs:
@ -387,3 +391,40 @@ class Comment(Base):
body += '</span>' body += '</span>'
return body return body
@property
@lazy
def blackjack_html(self):
if not self.blackjack_result: return ''
split_result = self.blackjack_result.split('_')
blackjack_status = split_result[3]
player_hand = split_result[0].replace('X', '10')
dealer_hand = split_result[1].split('/')[0] if blackjack_status == 'active' else split_result[1]
dealer_hand = dealer_hand.replace('X', '10')
wager = int(split_result[4])
try: kind = split_result[5]
except: kind = "coins"
currency_kind = "Coins" if kind == "coins" else "Marseybux"
try: is_insured = split_result[6]
except: is_insured = "0"
body = f"<span id='blackjack-{self.id}' class='ml-2'><em>{player_hand} vs. {dealer_hand}</em>"
if blackjack_status == 'push':
body += f"<strong class='ml-2'>Pushed. Refunded {wager} {currency_kind}.</strong>"
elif blackjack_status == 'bust':
body += f"<strong class='ml-2'>Bust. Lost {wager} {currency_kind}.</strong>"
elif blackjack_status == 'lost':
body += f"<strong class='ml-2'>Lost {wager} {currency_kind}.</strong>"
elif blackjack_status == 'won':
body += f"<strong class='ml-2'>Won {wager} {currency_kind}.</strong>"
elif blackjack_status == 'blackjack':
body += f"<strong class='ml-2'>Blackjack! Won {floor(wager * 3/2)} {currency_kind}.</strong>"
if is_insured == "1":
body += f" <em class='text-success'>Insured.</em>"
body += '</span>'
return body

View File

@ -52,7 +52,7 @@ PUSHER_ID_CSP = ""
if PUSHER_ID != "blahblahblah": if PUSHER_ID != "blahblahblah":
PUSHER_ID_CSP = f" {PUSHER_ID}.pushnotifications.pusher.com" PUSHER_ID_CSP = f" {PUSHER_ID}.pushnotifications.pusher.com"
CONTENT_SECURITY_POLICY_DEFAULT = "script-src 'self' 'unsafe-inline' ajax.cloudflare.com; connect-src 'self'; object-src 'none';" CONTENT_SECURITY_POLICY_DEFAULT = "script-src 'self' 'unsafe-inline' ajax.cloudflare.com; connect-src 'self'; object-src 'none';"
CONTENT_SECURITY_POLICY_HOME = f"script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self' tls-user1.fpapi.io api.fpjs.io{PUSHER_ID_CSP}; object-src 'none';" CONTENT_SECURITY_POLICY_HOME = f"script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self' tls-use1.fpapi.io api.fpjs.io{PUSHER_ID_CSP}; object-src 'none';"
if SITE == "localhost": SITE_FULL = 'http://' + SITE if SITE == "localhost": SITE_FULL = 'http://' + SITE
else: SITE_FULL = 'https://' + SITE else: SITE_FULL = 'https://' + SITE
@ -148,7 +148,7 @@ AGENDAPOSTER_MSG_HTML = """<p>Hi <a href="/id/{id}"><img loading="lazy" src="/pp
<p>Don't worry, we're here to help! We won't let you post or comment anything that doesn't express your love and acceptance towards the trans community. Feel free to resubmit your {type} with <code>{AGENDAPOSTER_PHRASE}</code> included.</p> <p>Don't worry, we're here to help! We won't let you post or comment anything that doesn't express your love and acceptance towards the trans community. Feel free to resubmit your {type} with <code>{AGENDAPOSTER_PHRASE}</code> included.</p>
<p><em>This is an automated message; if you need help, you can message us <a href="/contact">here</a>.</em></p>""" <p><em>This is an automated message; if you need help, you can message us <a href="/contact">here</a>.</em></p>"""
DISCORD_CHANGELOG_CHANNEL_IDS = [1022232469606498324] DISCORD_CHANGELOG_CHANNEL_ID = 1034632681788538980
WPD_CHANNEL_ID = 1013990963846332456 WPD_CHANNEL_ID = 1013990963846332456
PIN_AWARD_TEXT = " (pin award)" PIN_AWARD_TEXT = " (pin award)"
@ -786,6 +786,14 @@ AWARDS = {
"color": "text-green", "color": "text-green",
"price": 150 "price": 150
}, },
"agendaposter": {
"kind": "agendaposter",
"title": "Chud",
"description": "Forces the chud theme on the recipient for 24 hours.",
"icon": "fas fa-snooze",
"color": "text-purple",
"price": 500
},
"rehab": { "rehab": {
"kind": "rehab", "kind": "rehab",
"title": "Rehab", "title": "Rehab",
@ -874,14 +882,6 @@ AWARDS = {
"color": "text-brown", "color": "text-brown",
"price": 2000 "price": 2000
}, },
"agendaposter": {
"kind": "agendaposter",
"title": "Chud",
"description": "Forces the chud theme on the recipient for 24 hours.",
"icon": "fas fa-snooze",
"color": "text-purple",
"price": 2500
},
"deflector": { "deflector": {
"kind": "deflector", "kind": "deflector",
"title": "Deflector", "title": "Deflector",
@ -1339,3 +1339,51 @@ forced_hats = {
} }
EMAIL_REGEX_PATTERN = '[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{2,63}\.[A-Za-z]{2,63}' EMAIL_REGEX_PATTERN = '[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{2,63}\.[A-Za-z]{2,63}'
BOOSTED_SITES = {
'rdrama.net',
'pcmemes.net',
'watchpeopledie.tv',
'themotte.org',
'quora.com',
'cumtown.org',
'notabug.io',
'talk.lol',
'discussions.app',
'gab.com',
'kiwifarms.net',
'gettr.com',
'scored.co',
'parler.com',
'bitchute.com',
'4chan.org',
'givesendgo.com',
'thepinkpill.com',
'ovarit.com',
'rdrama.cc',
'lolcow.farm',
'truthsocial.com',
'rumble.com',
'saidit.net',
'kiwifarms.cc',
'8kun.top',
'goyimtv.tv',
'poal.co',
'stormfront.org',
'arete.network',
'poa.st',
'lbry.com',
'crystal.cafe',
'tribel.com',
'mstdn.social',
'mastodon.online',
'steemit.com',
'hexbear.net',
'raddle.me',
'lemmy.ml',
'bluelight.org',
'incels.is',
'groups.google.com',
't.me',
'web.telegram.org'
}

View File

@ -10,8 +10,7 @@ def discord_message_send(channel_id, message):
timeout=5) timeout=5)
def send_changelog_message(message): def send_changelog_message(message):
for channel_id in DISCORD_CHANGELOG_CHANNEL_IDS: discord_message_send(DISCORD_CHANGELOG_CHANNEL_ID, message)
discord_message_send(channel_id, message)
def send_wpd_message(message): def send_wpd_message(message):
discord_message_send(WPD_CHANNEL_ID, message) discord_message_send(WPD_CHANNEL_ID, message)

View File

@ -72,7 +72,7 @@ def notify_mentions(send_to, mentions, mention_str='site mention'):
permalink = m['permalink'] permalink = m['permalink']
text = sanitize(m['text'], golden=False) text = sanitize(m['text'], golden=False)
notif_text = \ notif_text = \
f"""<p>New {mention_str} by <a href="https://old.reddit.com/u/{author}" rel="nofollow noopener noreferrer" target="_blank">/u/{author}</a></p><p><a href="https://old.reddit.com{permalink}?context=89" rel="nofollow noopener noreferrer" target="_blank">https://old.reddit.com{permalink}?context=89</a></p>{text}""" f"""<p>New {mention_str} by <a href="https://old.reddit.com/u/{author}" rel="nofollow noopener" target="_blank">/u/{author}</a></p><p><a href="https://old.reddit.com{permalink}?context=89" rel="nofollow noopener" target="_blank">https://old.reddit.com{permalink}?context=89</a></p>{text}"""
existing_comment = g.db.query(Comment.id).filter_by( existing_comment = g.db.query(Comment.id).filter_by(
author_id=const.AUTOJANNY_ID, author_id=const.AUTOJANNY_ID,

View File

@ -95,7 +95,7 @@ def gambler_placed_roulette_bet(gambler, bet, which, amount, currency):
if len(active_games) == 0: if len(active_games) == 0:
parent_id = int(time.time()) parent_id = int(time.time())
else: else:
parent_id = json.loads(active_games[0].game_state)['parent_id'] parent_id = active_games[0].game_state_json['parent_id']
charge_gambler(gambler, amount, currency) charge_gambler(gambler, amount, currency)
@ -130,7 +130,7 @@ def get_roulette_bets_and_betters():
participants.append(game.user_id) participants.append(game.user_id)
user = get_account(game.user_id) user = get_account(game.user_id)
game_state = json.loads(game.game_state) game_state = game.game_state_json
bet = game_state['bet'] bet = game_state['bet']
bets[bet].append({ bets[bet].append({
'game_id': game.id, 'game_id': game.id,

View File

@ -36,7 +36,7 @@ def allowed_attributes(tag, name, value):
if tag == 'a': if tag == 'a':
if name == 'href' and '\\' not in value and 'xn--' not in value: if name == 'href' and '\\' not in value and 'xn--' not in value:
return True return True
if name == 'rel' and value == 'nofollow noopener noreferrer': return True if name == 'rel' and value == 'nofollow noopener': return True
if name == 'target' and value == '_blank': return True if name == 'target' and value == '_blank': return True
return False return False
@ -46,7 +46,6 @@ def allowed_attributes(tag, name, value):
if name == 'data-bs-toggle' and value == 'tooltip': return True if name == 'data-bs-toggle' and value == 'tooltip': return True
if name in ['g','b','glow'] and not value: return True if name in ['g','b','glow'] and not value: return True
if name in ['alt','title']: return True if name in ['alt','title']: return True
if name == 'referrerpolicy' and value == 'no-referrer': return True
return False return False
if tag == 'lite-youtube': if tag == 'lite-youtube':
@ -120,7 +119,7 @@ def callback(attrs, new=False):
if not href.startswith('/') and not href.startswith(f'{SITE_FULL}/'): if not href.startswith('/') and not href.startswith(f'{SITE_FULL}/'):
attrs[(None, "target")] = "_blank" attrs[(None, "target")] = "_blank"
attrs[(None, "rel")] = "nofollow noopener noreferrer" attrs[(None, "rel")] = "nofollow noopener"
return attrs return attrs
@ -235,7 +234,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
# replacing zero width characters, overlines, fake colons # replacing zero width characters, overlines, fake colons
sanitized = sanitized.replace('\u200e','').replace('\u200b','').replace("\ufeff", "").replace("\u033f","").replace("\u0589", ":") sanitized = sanitized.replace('\u200e','').replace('\u200b','').replace("\ufeff", "").replace("\u033f","").replace("\u0589", ":")
sanitized = reddit_regex.sub(r'\1<a href="https://old.reddit.com/\2" rel="nofollow noopener noreferrer" target="_blank">/\2</a>', sanitized) sanitized = reddit_regex.sub(r'\1<a href="https://old.reddit.com/\2" rel="nofollow noopener" target="_blank">/\2</a>', sanitized)
sanitized = sub_regex.sub(r'\1<a href="/\2">/\2</a>', sanitized) sanitized = sub_regex.sub(r'\1<a href="/\2">/\2</a>', sanitized)
v = getattr(g, 'v', None) v = getattr(g, 'v', None)
@ -262,7 +261,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
for tag in soup.find_all("img"): for tag in soup.find_all("img"):
if tag.get("src") and not tag["src"].startswith('/pp/'): if tag.get("src") and not tag["src"].startswith('/pp/'):
if not is_safe_url(tag["src"]): if not is_safe_url(tag["src"]):
a = soup.new_tag("a", href=tag["src"], rel="nofollow noopener noreferrer", target="_blank") a = soup.new_tag("a", href=tag["src"], rel="nofollow noopener", target="_blank")
a.string = tag["src"] a.string = tag["src"]
tag.replace_with(a) tag.replace_with(a)
continue continue
@ -272,13 +271,10 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
tag["src"] = "/i/l.webp" tag["src"] = "/i/l.webp"
tag['alt'] = f'![]({tag["data-src"]})' tag['alt'] = f'![]({tag["data-src"]})'
if not is_site_url(tag["data-src"]):
tag['referrerpolicy'] = "no-referrer"
if tag.parent.name != 'a': if tag.parent.name != 'a':
a = soup.new_tag("a", href=tag["data-src"]) a = soup.new_tag("a", href=tag["data-src"])
if not is_site_url(a["href"]): if not is_site_url(a["href"]):
a["rel"] = "nofollow noopener noreferrer" a["rel"] = "nofollow noopener"
a["target"] = "_blank" a["target"] = "_blank"
tag = tag.replace_with(a) tag = tag.replace_with(a)
a.append(tag) a.append(tag)

View File

@ -45,10 +45,11 @@ def casino_slot_pull(gambler, wager_value, currency):
casino_game.kind = 'slots' casino_game.kind = 'slots'
casino_game.game_state = json.dumps(game_state) casino_game.game_state = json.dumps(game_state)
g.db.add(casino_game) g.db.add(casino_game)
g.db.flush()
return True, casino_game.game_state return casino_game.id, casino_game.game_state
else: else:
return False, "{}" return 0, "{}",
def build_symbols(for_payout): def build_symbols(for_payout):

View File

@ -76,7 +76,7 @@ def get_active_twentyone_game(gambler):
def get_active_twentyone_game_state(gambler): def get_active_twentyone_game_state(gambler):
active_game = get_active_twentyone_game(gambler) active_game = get_active_twentyone_game(gambler)
full_state = json.loads(active_game.game_state) full_state = active_game.game_state_json
return remove_exploitable_information(full_state) return remove_exploitable_information(full_state)
@ -286,7 +286,7 @@ def dispatch_action(gambler, action):
raise Exception( raise Exception(
f'Illegal action {action} passed to Blackjack#dispatch_action.') f'Illegal action {action} passed to Blackjack#dispatch_action.')
state = json.loads(game.game_state) state = game.game_state_json
if action == BlackjackAction.BUY_INSURANCE: if action == BlackjackAction.BUY_INSURANCE:
if not can_purchase_insurance(state): if not can_purchase_insurance(state):

View File

@ -182,7 +182,7 @@ def award_thing(v, thing_type, id):
return {"message": f"{AWARDS[kind]['title']} award given to {thing_type} successfully!"} return {"message": f"{AWARDS[kind]['title']} award given to {thing_type} successfully!"}
if author.deflector and v.id != AEVANN_ID and (AWARDS[kind]['price'] > 500 or kind == 'marsify' or kind.istitle()) and kind not in ('pin','unpin','benefactor'): if author.deflector and (AWARDS[kind]['price'] > 500 or kind == 'marsify' or kind.istitle()) and kind not in ('pin','unpin','benefactor'):
msg = f"@{v.username} has tried to give your [{thing_type}]({thing.shortlink}) the {AWARDS[kind]['title']} Award but it was deflected and applied to them :marseytroll:" msg = f"@{v.username} has tried to give your [{thing_type}]({thing.shortlink}) the {AWARDS[kind]['title']} Award but it was deflected and applied to them :marseytroll:"
send_repeatable_notification(author.id, msg) send_repeatable_notification(author.id, msg)
msg = f"{safe_username} is under the effect of a deflector award; your {AWARDS[kind]['title']} Award has been deflected back to you :marseytroll:" msg = f"{safe_username} is under the effect of a deflector award; your {AWARDS[kind]['title']} Award has been deflected back to you :marseytroll:"
@ -246,10 +246,13 @@ def award_thing(v, thing_type, id):
cache.delete_memoized(frontlist) cache.delete_memoized(frontlist)
else: thing.stickied_utc = t else: thing.stickied_utc = t
g.db.add(thing) g.db.add(thing)
elif kind == "agendaposter" and not (author.agendaposter and author.agendaposter == 0): elif kind == "agendaposter":
if author.marseyawarded: if author.marseyawarded:
abort(409, "This user is under the effect of a conflicting award: Marsey award.") abort(409, "This user is under the effect of a conflicting award: Marsey award.")
if author.agendaposter == 1:
abort(409, "This user is perma-chudded.")
if author.agendaposter and time.time() < author.agendaposter: author.agendaposter += 86400 if author.agendaposter and time.time() < author.agendaposter: author.agendaposter += 86400
else: author.agendaposter = int(time.time()) + 86400 else: author.agendaposter = int(time.time()) + 86400
@ -327,7 +330,7 @@ def award_thing(v, thing_type, id):
else: author.marsify = int(time.time()) + 21600 else: author.marsify = int(time.time()) + 21600
badge_grant(user=author, badge_id=170) badge_grant(user=author, badge_id=170)
if thing_type == 'comment' and (not author.deflector or v.id == AEVANN_ID): if thing_type == 'comment' and not author.deflector:
body = thing.body body = thing.body
if author.owoify: body = owoify(body) if author.owoify: body = owoify(body)
body = marsify(body) body = marsify(body)
@ -353,7 +356,7 @@ def award_thing(v, thing_type, id):
else: author.owoify = int(time.time()) + 21600 else: author.owoify = int(time.time()) + 21600
badge_grant(user=author, badge_id=167) badge_grant(user=author, badge_id=167)
if thing_type == 'comment' and not (author.deflector or v.id == AEVANN_ID): if thing_type == 'comment' and not author.deflector:
body = thing.body body = thing.body
body = owoify(body) body = owoify(body)
if author.marsify: body = marsify(body) if author.marsify: body = marsify(body)

View File

@ -95,15 +95,16 @@ def pull_slots(v):
except: except:
abort(400, "Invalid currency (expected 'coin' or 'marseybux').") abort(400, "Invalid currency (expected 'coin' or 'marseybux').")
if (currency == "coin" and wager > v.coins) or (currency == "marseybux" and wager > v.procoins): if (currency == "coins" and wager > v.coins) or (currency == "procoins" and wager > v.procoins):
abort(400, f"Not enough {currency} to make that bet") abort(400, f"Not enough {currency} to make that bet")
success, game_state = casino_slot_pull(v, wager, currency) game_id, game_state = casino_slot_pull(v, wager, currency)
success = bool(game_id)
if success: if success:
return {"game_state": game_state, "gambler": {"coins": v.coins, "procoins": v.procoins}} return {"game_state": game_state, "gambler": {"coins": v.coins, "procoins": v.procoins}}
else: else:
abort(400, f"Wager must be more than 5 {currency}") abort(400, f"Wager must be 5 {currency} or more")
# 21 # 21

View File

@ -368,6 +368,35 @@ def comment(v):
parent_post.comment_count += 1 parent_post.comment_count += 1
g.db.add(parent_post) g.db.add(parent_post)
if FEATURES['GAMBLING'] and '!slots' in c.body:
if v.rehab:
abort(403, "You are under Rehab award effect!")
if '!slotsmb' in c.body:
command_word = '!slotsmb'
currency = 'procoins'
else:
command_word = '!slots'
currency = 'coins'
wager = c.body.split(command_word)[1].split()[0]
try:
wager = int(wager)
except:
abort(400, "Invalid wager.")
if wager < 100:
abort(400, f"Wager must be 100 {currency} or more")
if (currency == "coins" and wager > v.coins) or (currency == "procoins" and wager > v.procoins):
abort(400, f"Not enough {currency} to make that bet")
game_id, game_state = casino_slot_pull(v, wager, currency)
c.casino_game_id = game_id
g.db.flush() g.db.flush()
if v.client: return c.json if v.client: return c.json

View File

@ -695,7 +695,7 @@ def submit_post(v, sub=None):
if "twitter.com" == domain: if "twitter.com" == domain:
try: try:
embed = requests.get("https://publish.twitter.com/oembed", params={"url":url, "omit_script":"t"}, timeout=5).json()["html"] embed = requests.get("https://publish.twitter.com/oembed", params={"url":url, "omit_script":"t"}, timeout=5).json()["html"]
embed = embed.replace('<a href', '<a rel="nofollow noopener noreferrer" href') embed = embed.replace('<a href', '<a rel="nofollow noopener" href')
except: pass except: pass
elif url.startswith('https://youtube.com/watch?v='): elif url.startswith('https://youtube.com/watch?v='):
url = unquote(url).replace('?t', '&t') url = unquote(url).replace('?t', '&t')
@ -783,6 +783,8 @@ def submit_post(v, sub=None):
if url and url.startswith(SITE_FULL): if url and url.startswith(SITE_FULL):
url = url.split(SITE_FULL)[1] url = url.split(SITE_FULL)[1]
if v.agendaposter == 1: sub = 'chudrama'
post = Submission( post = Submission(
private=bool(request.values.get("private","")), private=bool(request.values.get("private","")),
notify=bool(request.values.get("notify","")), notify=bool(request.values.get("notify","")),

View File

@ -424,7 +424,7 @@ if SITE == 'pcmemes.net':
live_regex = re.compile('playerOverlayVideoDetailsRenderer":\{"title":\{"simpleText":"(.*?)"\},"subtitle":\{"runs":\[\{"text":"(.*?)"\},\{"text":""\},\{"text":"(.*?)"\}', flags=re.A) live_regex = re.compile('playerOverlayVideoDetailsRenderer":\{"title":\{"simpleText":"(.*?)"\},"subtitle":\{"runs":\[\{"text":"(.*?)"\},\{"text":""\},\{"text":"(.*?)"\}', flags=re.A)
live_thumb_regex = re.compile('\{"thumbnail":\{"thumbnails":\[\{"url":"(.*?)"', flags=re.A) live_thumb_regex = re.compile('\{"thumbnail":\{"thumbnails":\[\{"url":"(.*?)"', flags=re.A)
offline_regex = re.compile('","title":"(.*?)".*?"width":48,"height":48\},\{"url":"(.*?)"', flags=re.A) offline_regex = re.compile('","title":"(.*?)".*?"width":48,"height":48\},\{"url":"(.*?)"', flags=re.A)
offline_details_regex = re.compile('simpleText":"Μεταδόθηκε πριν από ([0-9]*?) ([^"]*?)"\},"viewCountText":\{"simpleText":"([0-9.]*?) προβολές"', flags=re.A) offline_details_regex = re.compile('simpleText":"Streamed ([0-9]*?) ([^"]*?)"\},.*?"viewCountText":\{"simpleText":"([0-9,]*?) views"', flags=re.A)
def process_streamer(id, live='live'): def process_streamer(id, live='live'):
url = f'https://www.youtube.com/channel/{id}/{live}' url = f'https://www.youtube.com/channel/{id}/{live}'
@ -463,36 +463,28 @@ if SITE == 'pcmemes.net':
y = offline_details_regex.search(text) y = offline_details_regex.search(text)
if y: if y:
views = y.group(3).replace('.', '') views = y.group(3).replace(',', '')
quantity = int(y.group(1)) quantity = int(y.group(1))
unit = y.group(2) unit = y.group(2)
if unit.startswith('δε'): if unit.startswith('second'):
unit = 'second'
modifier = 1/60 modifier = 1/60
elif unit.startswith('λεπτ'): elif unit.startswith('minute'):
unit = 'minute'
modifier = 1 modifier = 1
elif unit.startswith('ώρ'): elif unit.startswith('hour'):
unit = 'hour'
modifier = 60 modifier = 60
elif unit.startswith('ημέρ'): elif unit.startswith('day'):
unit = 'day'
modifier = 1440 modifier = 1440
elif unit.startswith('εβδομάδ'): elif unit.startswith('week'):
unit = 'week'
modifier = 10080 modifier = 10080
elif unit.startswith('μήν'): elif unit.startswith('month'):
unit = 'month'
modifier = 43800 modifier = 43800
elif unit.startswith('έτ'): elif unit.startswith('year'):
unit = 'year'
modifier = 525600 modifier = 525600
minutes = quantity * modifier minutes = quantity * modifier
actual = f'{quantity} {unit}' actual = f'{quantity} {unit}'
if quantity > 1: actual += 's'
else: else:
minutes = 9999999999 minutes = 9999999999
actual = '???' actual = '???'

View File

@ -139,7 +139,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
target.downvotes = get_vote_count(-1, False) target.downvotes = get_vote_count(-1, False)
target.realupvotes = get_vote_count(0, True) # first arg is ignored here target.realupvotes = get_vote_count(0, True) # first arg is ignored here
if target.author.progressivestack or (cls == Submission and (target.sub in ('space', 'istory', 'dinos') or target.domain.endswith('.win'))): if target.author.progressivestack or (cls == Submission and (target.sub in ('space', 'istory', 'dinos') or target.domain.endswith('.win') or target.domain in BOOSTED_SITES)):
target.realupvotes *= 2 target.realupvotes *= 2
g.db.add(target) g.db.add(target)
return "", 204 return "", 204

View File

@ -42,7 +42,7 @@
<form action="{{form_action}}" method="post"> <form action="{{form_action}}" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}"> <input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="input-username">Username</label><br> <label for="input-username">Username</label>
<input autocomplete="off" id="input-username" class="form-control" type="text" name="username" required> <input autocomplete="off" id="input-username" class="form-control" type="text" name="username" required>
<div class="overflow-x-auto"><table class="table table-striped"> <div class="overflow-x-auto"><table class="table table-striped">
@ -74,10 +74,10 @@
{% endfor %} {% endfor %}
</table> </table>
{% if grant %} {% if grant %}
<label for="input-url">URL</label><br> <label for="input-url">URL</label>
<input autocomplete="off" id="input-url" class="form-control" type="text" name="url" type="url" placeholder="Optional"> <input autocomplete="off" id="input-url" class="form-control" type="text" name="url" type="url" placeholder="Optional">
<label for="input-description">Custom description</label><br> <label for="input-description">Custom description</label>
<input autocomplete="off" id="input-description" class="form-control" type="text" name="description" placeholder="Leave blank for badge default"> <input autocomplete="off" id="input-description" class="form-control" type="text" name="description" placeholder="Leave blank for badge default">
{% endif %} {% endif %}
<input autocomplete="off" class="btn btn-primary mt-3" type="submit" onclick="disable(this)"> <input autocomplete="off" class="btn btn-primary mt-3" type="submit" onclick="disable(this)">

View File

@ -202,6 +202,17 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if c.slots_result %}
<em style="position: relative; top: 2px; margin-left: 0.5rem">{{c.slots_result}}</em>
{% elif c.casino_game_id %}
{% set game_state = c.casino_game.game_state_json %}
<em style="position: relative; top: 2px; margin-left: 0.5rem">{{game_state['symbols'].replace(',','')}} {{game_state['text']}}</em>
{% endif %}
{% if c.blackjack_result %}
{{c.blackjack_html | safe}}
{% endif %}
{% if c.wordle_result %} {% if c.wordle_result %}
{{c.wordle_html(v) | safe}} {{c.wordle_html(v) | safe}}
{% endif %} {% endif %}
@ -293,7 +304,7 @@
{% endif %} {% endif %}
</li> </li>
{% if v %} {% if v and not c.deleted_utc %}
<button type="button" class="list-inline-item mr-3 btn nobackground" onclick="ToggleReplyBox('reply-to-{{c.id}}')"><i class="fas fa-reply" style="margin-top:0.35rem"></i></button> <button type="button" class="list-inline-item mr-3 btn nobackground" onclick="ToggleReplyBox('reply-to-{{c.id}}')"><i class="fas fa-reply" style="margin-top:0.35rem"></i></button>
{% endif %} {% endif %}
@ -391,7 +402,9 @@
<button type="button" class="btn caction py-0 nobackground px-1 text-muted copy-link" data-clipboard-text="{% if SITE == 'rdrama.net' %}https://rdrama.org{{c.shortlink}}{% else %}{{c.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</button> <button type="button" class="btn caction py-0 nobackground px-1 text-muted copy-link" data-clipboard-text="{% if SITE == 'rdrama.net' %}https://rdrama.org{{c.shortlink}}{% else %}{{c.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</button>
{% if v %} {% if v %}
<button type="button" class="btn caction py-0 nobackground px-1 text-muted" onclick="ToggleReplyBox('reply-to-{{c.id}}')"><i class="fas fa-reply" aria-hidden="true"></i>Reply</button> {% if not c.deleted_utc %}
<button type="button" class="btn caction py-0 nobackground px-1 text-muted" onclick="ToggleReplyBox('reply-to-{{c.id}}')"><i class="fas fa-reply" aria-hidden="true"></i>Reply</button>
{% endif %}
<button type="button" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author_name}}',)"><i class="fas fa-flag fa-fw"></i>Report</button> <button type="button" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author_name}}',)"><i class="fas fa-flag fa-fw"></i>Report</button>

View File

@ -27,7 +27,7 @@
{% endif %} {% endif %}
<body id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" {% if SITE_NAME == 'rDrama' and v and (v.is_banned or v.agendaposter) %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="{% if path != '/formatting' %}overflow-x: hidden; {% endif %} background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}> <body id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" {% if SITE_NAME == 'rDrama' %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="{% if path != '/formatting' %}overflow-x: hidden; {% endif %} background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}>
{% block Banner %} {% block Banner %}
{% include "expanded_image_modal.html" %} {% include "expanded_image_modal.html" %}
@ -38,7 +38,7 @@
<img alt="/h/{{sub}} banner" onclick="expandDesktopImage()" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important"> <img alt="/h/{{sub}} banner" onclick="expandDesktopImage()" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important">
</a> </a>
{% elif SITE_NAME == 'rDrama' %} {% elif SITE_NAME == 'rDrama' %}
<a rel="nofollow noopener noreferrer" href="https://secure.transequality.org/site/Donation2?df_id=1480"> <a rel="nofollow noopener" href="https://secure.transequality.org/site/Donation2?df_id=1480">
{% if v and (v.is_banned or v.agendaposter) %} {% if v and (v.is_banned or v.agendaposter) %}
<img alt="site banner" src="/i/{{SITE_NAME}}/banner2.webp?v=2000" width="100%"> <img alt="site banner" src="/i/{{SITE_NAME}}/banner2.webp?v=2000" width="100%">
{% else %} {% else %}

View File

@ -11,11 +11,11 @@
<tbody> <tbody>
<tr> <tr>
<td>Gumroad (subscription)</td> <td>Gumroad (subscription)</td>
<td><a rel="nofollow noopener noreferrer" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a></td> <td><a rel="nofollow noopener" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a></td>
</tr> </tr>
<tr> <tr>
<td>Gumroad (one-time)</td> <td>Gumroad (one-time)</td>
<td><a rel="nofollow noopener noreferrer" href="https://kippy.gumroad.com/l/onetime">https://kippy.gumroad.com/l/onetime</a></td> <td><a rel="nofollow noopener" href="https://kippy.gumroad.com/l/onetime">https://kippy.gumroad.com/l/onetime</a></td>
</tr> </tr>
<tr> <tr>
<td>Ethereum/Brave Attention Token</td> <td>Ethereum/Brave Attention Token</td>

View File

@ -11,7 +11,7 @@
<tbody> <tbody>
<tr> <tr>
<td>Kofi</td> <td>Kofi</td>
<td><a rel="nofollow noopener noreferrer" href="{{KOFI_LINK}}">{{KOFI_LINK}}</a></td> <td><a rel="nofollow noopener" href="{{KOFI_LINK}}">{{KOFI_LINK}}</a></td>
</tr> </tr>
<tr> <tr>
<td>Ethereum/Brave Attention Token</td> <td>Ethereum/Brave Attention Token</td>

View File

@ -11,7 +11,7 @@
<tbody> <tbody>
<tr> <tr>
<td>Gumroad</td> <td>Gumroad</td>
<td><a rel="nofollow noopener noreferrer" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a></td> <td><a rel="nofollow noopener" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a></td>
</tr> </tr>
<tr> <tr>
<td>Ethereum/Brave Attention Token</td> <td>Ethereum/Brave Attention Token</td>
@ -27,11 +27,11 @@
</tr> </tr>
<tr> <tr>
<td>NFTs</td> <td>NFTs</td>
<td><a rel="nofollow noopener noreferrer" href="https://opensea.io/collection/marsey">https://opensea.io/collection/marsey</a></td> <td><a rel="nofollow noopener" href="https://opensea.io/collection/marsey">https://opensea.io/collection/marsey</a></td>
</tr> </tr>
<tr> <tr>
<td>Merch</td> <td>Merch</td>
<td><a rel="nofollow noopener noreferrer" href="https://redbubble.com/people/rdramanet/explore?sortOrder=top%20selling">https://redbubble.com/people/rdramanet/explore?sortOrder=top%20selling</a></td> <td><a rel="nofollow noopener" href="https://redbubble.com/people/rdramanet/explore?sortOrder=top%20selling">https://redbubble.com/people/rdramanet/explore?sortOrder=top%20selling</a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -87,7 +87,7 @@
</head> </head>
<body id="error-502"> <body id="error-502">
<a rel="nofollow noopener noreferrer" href="https://secure.transequality.org/site/Donation2?df_id=1480"> <a href="/i/PCM/cached.webp?v=3009">
<img alt="site banner" src="/i/PCM/cached.webp?v=3009" width="100%"> <img alt="site banner" src="/i/PCM/cached.webp?v=3009" width="100%">
</a> </a>

View File

@ -87,7 +87,7 @@
</head> </head>
<body id="error-502"> <body id="error-502">
<a rel="nofollow noopener noreferrer" href="https://secure.transequality.org/site/Donation2?df_id=1480"> <a href="/i/WPD/cached.webp?v=3009">
<img alt="site banner" src="/i/WPD/cached.webp?v=3009" width="100%"> <img alt="site banner" src="/i/WPD/cached.webp?v=3009" width="100%">
</a> </a>

View File

@ -15,9 +15,9 @@
<p class="text-muted">This page is only available to {% if SITE_NAME == 'rDrama' %}paypigs{% else %}patrons{% endif %}:</p> <p class="text-muted">This page is only available to {% if SITE_NAME == 'rDrama' %}paypigs{% else %}patrons{% endif %}:</p>
{% if FEATURES['PROCOINS'] and v.truecoins -%} {% if FEATURES['PROCOINS'] and v.truecoins -%}
{% if KOFI_LINK %} {% if KOFI_LINK %}
<a rel="nofollow noopener noreferrer" href="{{KOFI_LINK}}">{{KOFI_LINK}}</a> <a rel="nofollow noopener" href="{{KOFI_LINK}}">{{KOFI_LINK}}</a>
{% else %} {% else %}
<a rel="nofollow noopener noreferrer" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a> <a rel="nofollow noopener" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a>
{% endif %} {% endif %}
{%- endif %} {%- endif %}
</div> </div>

View File

@ -87,7 +87,7 @@
</head> </head>
<body id="error-502"> <body id="error-502">
<a rel="nofollow noopener noreferrer" href="https://secure.transequality.org/site/Donation2?df_id=1480"> <a rel="nofollow noopener" href="https://secure.transequality.org/site/Donation2?df_id=1480">
<img alt="site banner" src="/i/rDrama/cached.webp?v=3009" width="100%"> <img alt="site banner" src="/i/rDrama/cached.webp?v=3009" width="100%">
</a> </a>

View File

@ -3,8 +3,8 @@
<div class="modal-content bg-transparent shadow-none"> <div class="modal-content bg-transparent shadow-none">
<div class="modal-body text-center p-0"> <div class="modal-body text-center p-0">
<div class="d-inline-block position-relative"> <div class="d-inline-block position-relative">
<a href="/" rel="nofollow noopener noreferrer" target="_blank" id="desktop-expanded-image-wrap-link"> <a href="/" rel="nofollow noopener" target="_blank" id="desktop-expanded-image-wrap-link">
<img loading="lazy" alt="expanded image" referrerpolicy="no-referrer" src="" class="img-fluid rounded" id="desktop-expanded-image" style="min-width: 250px;min-width: min(250px,50vw);max-height:90vh;border:5px white solid"> <img loading="lazy" alt="expanded image" src="" class="img-fluid rounded" id="desktop-expanded-image" style="min-width: 250px;min-width: min(250px,50vw);max-height:90vh;border:5px white solid">
</a> </a>
</div> </div>
</div> </div>

View File

@ -61,7 +61,7 @@ Text 2
<tr> <tr>
<td>Images (will embed automatically if from <a href="#approved">approved hosts</a>)</td> <td>Images (will embed automatically if from <a href="#approved">approved hosts</a>)</td>
<td>https://i.imgur.com/SwVuagI_d.webp</td> <td>https://i.imgur.com/SwVuagI_d.webp</td>
<td><img loading="lazy" alt="example image" referrerpolicy="no-referrer" src="https://i.imgur.com/SwVuagI_d.webp"></td> <td><img loading="lazy" alt="example image" src="https://i.imgur.com/SwVuagI_d.webp"></td>
</tr> </tr>
<tr> <tr>
<td>Youtube Videos</td> <td>Youtube Videos</td>
@ -218,12 +218,12 @@ Text 2
<tr> <tr>
<td>Subreddit Mention</td> <td>Subreddit Mention</td>
<td>r/drama</td> <td>r/drama</td>
<td><a class="d-inline-block" rel="nofollow noopener noreferrer" href="https://www.reddit.com/r/drama">r/drama</a></td> <td><a class="d-inline-block" rel="nofollow noopener" href="https://www.reddit.com/r/drama">r/drama</a></td>
</tr> </tr>
<tr> <tr>
<td>Redditor Mention</td> <td>Redditor Mention</td>
<td>u/Bardfinn</td> <td>u/Bardfinn</td>
<td><a class="d-inline-block" rel="nofollow noopener noreferrer" href="https://www.reddit.com/u/Bardfinn">u/Bardfinn</a></td> <td><a class="d-inline-block" rel="nofollow noopener" href="https://www.reddit.com/u/Bardfinn">u/Bardfinn</a></td>
</tr> </tr>
</tbody> </tbody>
</table></div> </table></div>
@ -511,16 +511,16 @@ line breaks
This is a &lt;a href='https://www.w3schools.com/tags/tag_a.asp'&gt;link&lt;/a&gt; This is a &lt;a href='https://www.w3schools.com/tags/tag_a.asp'&gt;link&lt;/a&gt;
</td> </td>
<td> <td>
This is a <a rel="nofollow noopener noreferrer" href='https://www.w3schools.com/tags/tag_a.asp'>link</a> This is a <a rel="nofollow noopener" href='https://www.w3schools.com/tags/tag_a.asp'>link</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Images</td> <td>Images</td>
<td> <td>
&lt;img referrerpolicy="no-referrer" src="https://i.imgur.com/SwVuagI_d.webp" width="200"&gt; &lt;img src="https://i.imgur.com/SwVuagI_d.webp" width="200"&gt;
</td> </td>
<td> <td>
<img loading="lazy" alt="example image" referrerpolicy="no-referrer" src="https://i.imgur.com/SwVuagI_d.webp" width="200"> <img loading="lazy" alt="example image" src="https://i.imgur.com/SwVuagI_d.webp" width="200">
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -239,7 +239,7 @@
<a class="dropdown-item" href="{{v.url}}"><i class="fas fa-user-circle fa-fw mr-3"></i>My profile</a> <a class="dropdown-item" href="{{v.url}}"><i class="fas fa-user-circle fa-fw mr-3"></i>My profile</a>
<a class="dropdown-item" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a> <a class="dropdown-item" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
{% if FEATURES['PROCOINS'] and v.truecoins >= 1000 %} {% if FEATURES['PROCOINS'] and v.truecoins >= 1000 %}
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="/donate"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a> <a class="dropdown-item" rel="nofollow noopener" href="/donate"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
{% endif %} {% endif %}
<button type="button" class="dropdown-item copy-link" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.username}}"><i class="fas fa-user-friends fa-fw mr-3"></i>Invite friends</button> <button type="button" class="dropdown-item copy-link" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.username}}"><i class="fas fa-user-friends fa-fw mr-3"></i>Invite friends</button>
@ -250,12 +250,12 @@
<a class="dropdown-item" href="https://rdrama.net/h/changelog"><i class="fas fa-clipboard fa-fw mr-3"></i>Changelog</a> <a class="dropdown-item" href="https://rdrama.net/h/changelog"><i class="fas fa-clipboard fa-fw mr-3"></i>Changelog</a>
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a> <a class="dropdown-item" rel="nofollow noopener" href="https://github.com/Aevann1/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="https://rdrama.net/post/18459"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a> <a class="dropdown-item" rel="nofollow noopener" href="https://rdrama.net/post/18459"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a>
{% if TELEGRAM_LINK != 'blahblahblah' %} {% if TELEGRAM_LINK != 'blahblahblah' %}
<a rel="nofollow noopener noreferrer" class="dropdown-item" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a> <a rel="nofollow noopener" class="dropdown-item" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a>
{% endif %} {% endif %}
{% if SITE_NAME == 'rDrama' %} {% if SITE_NAME == 'rDrama' %}
@ -299,7 +299,7 @@
</li> </li>
{% if FEATURES['PROCOINS'] and v.truecoins >= 1000 %} {% if FEATURES['PROCOINS'] and v.truecoins >= 1000 %}
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="/donate"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a> <a class="nav-item nav-link" rel="nofollow noopener" href="/donate"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
{% endif %} {% endif %}
{% if not g.webview %} {% if not g.webview %}
@ -314,12 +314,12 @@
<a class="nav-item nav-link" href="https://rdrama.net/h/changelog"><i class="fas fa-clipboard fa-fw mr-3"></i>Changelog</a> <a class="nav-item nav-link" href="https://rdrama.net/h/changelog"><i class="fas fa-clipboard fa-fw mr-3"></i>Changelog</a>
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a> <a class="nav-item nav-link" rel="nofollow noopener" href="https://github.com/Aevann1/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://rdrama.net/post/18459"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a> <a class="nav-item nav-link" rel="nofollow noopener" href="https://rdrama.net/post/18459"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a>
{% if TELEGRAM_LINK != 'blahblahblah' %} {% if TELEGRAM_LINK != 'blahblahblah' %}
<a rel="nofollow noopener noreferrer" class="nav-item nav-link" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a> <a rel="nofollow noopener" class="nav-item nav-link" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a>
{% endif %} {% endif %}
{% if SITE_NAME == 'rDrama' %}<a class="nav-item nav-link" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Archives</a>{% endif %} {% if SITE_NAME == 'rDrama' %}<a class="nav-item nav-link" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Archives</a>{% endif %}

View File

@ -34,6 +34,6 @@ set JOURNOID_BANNERS = [
-%} -%}
{% set journoid = JOURNOID_BANNERS|random %} {% set journoid = JOURNOID_BANNERS|random %}
<a rel="nofollow noopener noreferrer" id="srd-link" href="{{journoid[1]}}">{{journoid[0]}}</a> <a rel="nofollow noopener" id="srd-link" href="{{journoid[1]}}">{{journoid[0]}}</a>
<span id="srd-separator">&mdash;</span> <span id="srd-separator">&mdash;</span>
<a id="srd-discuss" href="{{journoid[2]}}">(discuss)</a> <a id="srd-discuss" href="{{journoid[2]}}">(discuss)</a>

View File

@ -53,7 +53,7 @@
<tbody> <tbody>
{% for id, link, thumb, name, title, viewers in live %} {% for id, link, thumb, name, title, viewers in live %}
<tr onclick="go_to(event,'{{link}}')"> <tr onclick="go_to(event,'{{link}}')">
<td width="48"><img loading="lazy" class="thumb" src="{{thumb}}" alt="{{name}} thumbnail" referrerpolicy="no-referrer" width="48"></td> <td width="48"><img loading="lazy" class="thumb" src="{{thumb}}" alt="{{name}} thumbnail" width="48"></td>
<td>{{name}}</td> <td>{{name}}</td>
<td>{{title}}</td> <td>{{title}}</td>
<td>{{viewers}} watching</td> <td>{{viewers}} watching</td>
@ -78,9 +78,9 @@
<tbody> <tbody>
{% for id, link, thumb, name, minutes, actual, views in offline %} {% for id, link, thumb, name, minutes, actual, views in offline %}
<tr onclick="go_to(event,'{{link}}')"> <tr onclick="go_to(event,'{{link}}')">
<td width="48"><img loading="lazy" class="thumb" src="{{thumb}}" alt="{{name}} thumbnail" referrerpolicy="no-referrer" width="48"></td> <td width="48"><img loading="lazy" class="thumb" src="{{thumb}}" alt="{{name}} thumbnail" width="48"></td>
<td>{{name}}</td> <td>{{name}}</td>
<td>{{actual}} ago</td> <td>{{actual}}</td>
<td>{{views}} views</td> <td>{{views}} views</td>
{% if v and v.admin_level >= PERMS['STREAMERS_MODERATION'] %} {% if v and v.admin_level >= PERMS['STREAMERS_MODERATION'] %}
<td> <td>

View File

@ -7,7 +7,7 @@
</head> </head>
{{html_head.html_head(true, false, true, none, "Settings", "", "", false)}} {{html_head.html_head(true, false, true, none, "Settings", "", "", false)}}
<body id="settings" {% if SITE_NAME == 'rDrama' and v and (v.is_banned or v.agendaposter) %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}> <body id="settings" {% if SITE_NAME == 'rDrama' %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}>
{% include "header.html" %} {% include "header.html" %}
<div class="container"> <div class="container">

View File

@ -3,7 +3,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
{{html_head.html_head(true, false, true, none, none, "", "")}} {{html_head.html_head(true, false, true, none, none, "", "")}}
<body id="settings2" {% if SITE_NAME == 'rDrama' and v and (v.is_banned or v.agendaposter) %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}> <body id="settings2" {% if SITE_NAME == 'rDrama' %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}>
{% include "header.html" %} {% include "header.html" %}

View File

@ -60,9 +60,9 @@
{% if FEATURES['PROCOINS'] and v.truecoins >= 1000 %} {% if FEATURES['PROCOINS'] and v.truecoins >= 1000 %}
<span class="text-small text-muted pl-1">Must be same email as the one you used to donate on <span class="text-small text-muted pl-1">Must be same email as the one you used to donate on
{% if KOFI_TOKEN %} {% if KOFI_TOKEN %}
<a rel="nofollow noopener noreferrer" class="text-primary" href="{{KOFI_LINK}}">Kofi</a> <a rel="nofollow noopener" class="text-primary" href="{{KOFI_LINK}}">Kofi</a>
{% else %} {% else %}
<a rel="nofollow noopener noreferrer" class="text-primary" href="{{GUMROAD_LINK}}">Gumroad</a> <a rel="nofollow noopener" class="text-primary" href="{{GUMROAD_LINK}}">Gumroad</a>
{% endif %} {% endif %}
</span> </span>
{% endif %} {% endif %}

View File

@ -29,11 +29,11 @@
<a class="btn btn-primary btn-block" href="/post/4103">BUGS/SUGGESTIONS MEGATHREAD</a> <a class="btn btn-primary btn-block" href="/post/4103">BUGS/SUGGESTIONS MEGATHREAD</a>
<a class="btn btn-primary btn-block" href="/post/9694" >OFFICIAL CONSPIRACY THEORY THREAD</a> <a class="btn btn-primary btn-block" href="/post/9694" >OFFICIAL CONSPIRACY THEORY THREAD</a>
<a class="btn btn-primary btn-block" href="/post/10415">OFFICIAL GAMBLING THREAD</a> <a class="btn btn-primary btn-block" href="/post/10415">OFFICIAL GAMBLING THREAD</a>
<a rel="nofollow noopener noreferrer" class="btn btn-primary btn-block" href="https://imgur.com/a/UFGJybS">PCM Watermark Collection</a> <a rel="nofollow noopener" class="btn btn-primary btn-block" href="https://imgur.com/a/UFGJybS">PCM Watermark Collection</a>
<a rel="nofollow noopener noreferrer" class="btn btn-primary btn-block" href="https://imgur.com/a/HxBfECG">TRS</a> <a rel="nofollow noopener" class="btn btn-primary btn-block" href="https://imgur.com/a/HxBfECG">TRS</a>
<a rel="nofollow noopener noreferrer" class="btn btn-primary btn-block" href="https://imgur.com/a/Wkw11eX">Current RV Cutouts</a> <a rel="nofollow noopener" class="btn btn-primary btn-block" href="https://imgur.com/a/Wkw11eX">Current RV Cutouts</a>
<a rel="nofollow noopener noreferrer" class="btn btn-primary btn-block" href="https://imgur.com/a/B3XHKnD">PCM Shitposter Cutouts (1/?)</a> <a rel="nofollow noopener" class="btn btn-primary btn-block" href="https://imgur.com/a/B3XHKnD">PCM Shitposter Cutouts (1/?)</a>
<a rel="nofollow noopener noreferrer" class="btn btn-primary btn-block" href="https://imgur.com/a/2wDZddF">PCM Shitposter Cutouts (2/?)</a> <a rel="nofollow noopener" class="btn btn-primary btn-block" href="https://imgur.com/a/2wDZddF">PCM Shitposter Cutouts (2/?)</a>
<p class="mt-4"> Rules: No doxing, No CP or other clearly illegal shit. Thanks.</p> <p class="mt-4"> Rules: No doxing, No CP or other clearly illegal shit. Thanks.</p>
<p class="mt-4"> This website has nothing to do with Political Compass Memes.</p> <p class="mt-4"> This website has nothing to do with Political Compass Memes.</p>

View File

@ -65,9 +65,9 @@
<a href="/h/music">Music</a> <a href="/h/music">Music</a>
</div> </div>
<div id="sidebar--rules"> <div class="sidebar--rules">
<h3 id="sidebar--rules--head" class="sidebar--heading">Rules</h3> <h3 class="sidebar--rules-head sidebar--heading">Rules</h3>
<ol id="sidebar--rules--list"> <ol class="sidebar--rules-list sidebar--rules-list--wpd">
<li>Do not post anything illegal under US law. <li>Do not post anything illegal under US law.
<ul> <ul>
<li>Do not threaten or advocate violence.</li> <li>Do not threaten or advocate violence.</li>

View File

@ -54,26 +54,21 @@
<a class="btn btn-primary btn-block mb-3" href="/create_hole">CREATE {{HOLE_NAME|upper}}</a> <a class="btn btn-primary btn-block mb-3" href="/create_hole">CREATE {{HOLE_NAME|upper}}</a>
{%- endif %} {%- endif %}
<div class="rules mt-5"> <div class="sidebar--rules">
<h3>Rules:</h3><br> <h3 class="sidebar--rules-head mt-4 mb-3">Rules</h3>
<ol class="sidebar--rules-list sidebar--rules-list--rdrama">
<li class="font-weight-bold" style="color: red"><a href="/post/19711/a-short-guide-on-how-to" style="color: inherit">NO RIGHTWING AGENDAPOSTING.</a></li>
<li>Don't post anything illegal.</li>
<li>No sexualizing minors even as a “joke”.</li>
<li>No doxing.</li>
<li>Using alts to game dramacoin will get you banned.</li>
<li>Supporting free speech is an immediate ban.</li>
<li class="font-weight-bold">Absolutely NO anti-CCP sentiment.</li>
</ol>
<a href="/post/19711/a-short-guide-on-how-to" style="color:red;font-weight:bold">- NO RIGHTWING AGENDAPOSTING.</a><br><br> <p>All rules can and likely will be ignored at the discretion of the janitorial staff. Be funny, or at least compelling, and pretty much anything legal is welcome.</p>
- Don't post anything illegal.<br><br> <p style="color: hotpink">𝐜𝐚𝐫𝐩 𝐰𝐨𝐳 𝐞𝐫𝐞</p>
- No sexualizing minors even as a “joke”.<br><br>
- No doxing.<br><br>
- Using alts to game dramacoin will get you banned.<br><br>
- Supporting free speech is an immediate ban.<br><br>
<b>- Absolutely NO anti-CCP sentiment.</b><br><br>
All rules can and likely will be ignored at the discretion of the janitorial staff. Be funny, or at least compelling, and pretty much anything legal is welcome.<br><br>
<span style="color:hotpink">𝐜𝐚𝐫𝐩 𝐰𝐨𝐳 𝐞𝐫𝐞</span><br><br>
</div> </div>
{% endif %} {% endif %}
</div> </div>

View File

@ -2,6 +2,7 @@
{%- import 'html_head.html' as html_head with context -%} {%- import 'html_head.html' as html_head with context -%}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
{{html_head.html_head(true, false, false, none, title, none, "", false, true)}}
<head> <head>
{{html_head.javascript()}} {{html_head.javascript()}}
{#{html_head.stylesheets(true, '')}#} {#{html_head.stylesheets(true, '')}#}

View File

@ -613,7 +613,7 @@
{% if not p.is_image and p.thumb_url and not p.embed_url %} {% if not p.is_image and p.thumb_url and not p.embed_url %}
<div class="card-header bg-transparent border-0 d-none d-md-flex flex-row flex-nowrap pl-3 p-0"> <div class="card-header bg-transparent border-0 d-none d-md-flex flex-row flex-nowrap pl-3 p-0">
<a rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}" style="height: fit-content"{% if not v or v.newtabexternal %}target="_blank"{% endif %}><img loading="lazy" src="{{p.thumb_url}}" class="post-img d-mob-none" alt="Unable to load image"></a> <a rel="nofollow noopener" href="{{p.realurl(v)}}" style="height: fit-content"{% if not v or v.newtabexternal %}target="_blank"{% endif %}><img loading="lazy" src="{{p.thumb_url}}" class="post-img d-mob-none" alt="Unable to load image"></a>
</div> </div>
{% endif %} {% endif %}
@ -706,7 +706,7 @@
{% endif %} {% endif %}
{% if p.realurl(v) and not v_forbid_deleted %} {% if p.realurl(v) and not v_forbid_deleted %}
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter and p.sub != 'chudrama' %}agendaposter{% endif %}"> <h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter and p.sub != 'chudrama' %}agendaposter{% endif %}">
<a {% if p.author.rainbow %}class="rainbow-text"{% endif %} {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}"> <a {% if p.author.rainbow %}class="rainbow-text"{% endif %} {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
{% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{CC}}</span>{% endif %} {% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{CC}}</span>{% endif %}
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %} {% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}} {{p.realtitle(v) | safe}}
@ -724,7 +724,7 @@
<div id="post-body" class="post-body mt-3"> <div id="post-body" class="post-body mt-3">
{% if p.realurl(v) %} {% if p.realurl(v) %}
{% if not p.embed_url and not p.is_image %} {% if not p.embed_url and not p.is_image %}
<a rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}> <a rel="nofollow noopener" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<div class="d-flex {% if p.is_video or p.is_audio %}d-md-none{% endif %} justify-content-between align-items-center border rounded p-2 mb-3"> <div class="d-flex {% if p.is_video or p.is_audio %}d-md-none{% endif %} justify-content-between align-items-center border rounded p-2 mb-3">
<span>{{p.realurl(v)}}</span> <span>{{p.realurl(v)}}</span>
<i class="fas fa-external-link-alt text-small"></i> <i class="fas fa-external-link-alt text-small"></i>
@ -752,7 +752,7 @@
{% if p.is_image %} {% if p.is_image %}
<div class="row no-gutters mb-1"> <div class="row no-gutters mb-1">
<div class="col"> <div class="col">
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}"> <a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img onclick="expandDesktopImage()" src="{{p.realurl(v)}}" class="img-fluid" style="max-height:500px" alt="Unable to load image"> <img onclick="expandDesktopImage()" src="{{p.realurl(v)}}" class="img-fluid" style="max-height:500px" alt="Unable to load image">
</a> </a>
</div> </div>
@ -964,7 +964,7 @@
</div> </div>
</div> </div>
{% if v %} {% if v and not p.deleted_utc %}
<div id="comment-form-space-{{p.fullname}}" class="comment-write mb-3"> <div id="comment-form-space-{{p.fullname}}" class="comment-write mb-3">
<form id="reply-to-{{p.fullname}}" action="/comment" method="post"> <form id="reply-to-{{p.fullname}}" action="/comment" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}"> <input type="hidden" name="formkey" value="{{v.formkey}}">

View File

@ -86,19 +86,19 @@
<img alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img"> <img alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a> </a>
{% elif p.is_image %} {% elif p.is_image %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener noreferrer"> <a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img onclick="expandDesktopImage('{{p.realurl(v)}}')" alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img"> <img onclick="expandDesktopImage('{{p.realurl(v)}}')" alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a> </a>
{% elif p.is_video or p.is_audio %} {% elif p.is_video or p.is_audio %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener noreferrer"> <a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img onclick="togglevideo('{{p.id}}')" alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img"> <img onclick="togglevideo('{{p.id}}')" alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a> </a>
{% elif p.is_youtube %} {% elif p.is_youtube %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener noreferrer"> <a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img onclick="toggleyoutube('{{p.id}}')" alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img"> <img onclick="toggleyoutube('{{p.id}}')" alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a> </a>
{% else %} {% else %}
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}"> <a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img"> <img alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
<i class="ext-link fas fa-external-link"></i> <i class="ext-link fas fa-external-link"></i>
</a> </a>
@ -323,7 +323,7 @@
{% if p.is_image and not p.over_18 and ((v and v.cardview) or (not v and CARD_VIEW)) %} {% if p.is_image and not p.over_18 and ((v and v.cardview) or (not v and CARD_VIEW)) %}
<div style="text-align: center" class="mt-3 mb-4"> <div style="text-align: center" class="mt-3 mb-4">
<a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}"> <a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img loading="lazy" data-src="{{p.realurl(v)}}" src="/i/l.webp" class="img-fluid" style="max-height:20rem" alt="Unable to load image"> <img loading="lazy" data-src="{{p.realurl(v)}}" src="/i/l.webp" class="img-fluid" style="max-height:20rem" alt="Unable to load image">
</a> </a>
</div> </div>

View File

@ -3,7 +3,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
{{html_head.html_head(true, false, true, none, "Create a post", none, "", false)}} {{html_head.html_head(true, false, true, none, "Create a post", none, "", false)}}
<body id="submit" {% if SITE_NAME == 'rDrama' and v and (v.is_banned or v.agendaposter) %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="overflow-x: hidden; background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background)display: block{% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}> <body id="submit" {% if SITE_NAME == 'rDrama' %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="overflow-x: hidden; background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background)display: block{% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}>
{% include "header.html" %} {% include "header.html" %}

View File

@ -43,7 +43,7 @@
<div class="container-fluid nobackground"> <div class="container-fluid nobackground">
<div class="d-md-flex text-center text-md-left"> <div class="d-md-flex text-center text-md-left">
<div id="profile--pfp" {% if u.hat_active %}class="profile--pfp--hat hat"{% endif %}> <div id="profile--pfp" {% if u.hat_active %}class="profile--pfp--hat hat"{% endif %}>
<a rel="nofollow noopener noreferrer" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-100-wrapper"> <a rel="nofollow noopener" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-100-wrapper">
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic profile-pic-100 mb-5"> <img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic profile-pic-100 mb-5">
{% if u.hat_active -%} {% if u.hat_active -%}
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-100-hat hat" loading="lazy" src="{{u.hat_active}}?h=7" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_tooltip(v)}}"> <img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-100-hat hat" loading="lazy" src="{{u.hat_active}}?h=7" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_tooltip(v)}}">
@ -240,7 +240,7 @@
<div id="profile--badges"> <div id="profile--badges">
{% for b in u.badges %} {% for b in u.badges %}
{% if b.url %} {% if b.url %}
<a class="contain" rel="nofollow noopener noreferrer" href="{{b.url}}"> <a class="contain" rel="nofollow noopener" href="{{b.url}}">
<img alt="{{b.name}}" width=55 height=60 loading="lazy" src="{{b.path}}?b=4" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{b.text}}" {% if b.until %}data-until="{{b.until}}" onmouseover="badge_timestamp(this)"{% endif %}> <img alt="{{b.name}}" width=55 height=60 loading="lazy" src="{{b.path}}?b=4" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{b.text}}" {% if b.until %}data-until="{{b.until}}" onmouseover="badge_timestamp(this)"{% endif %}>
</a> </a>
{% else %} {% else %}
@ -262,7 +262,7 @@
<div class="container-fluid pb-0 text-center bg-white d-md-none" style="margin-top:-6px;border-radius:0!important;"> <div class="container-fluid pb-0 text-center bg-white d-md-none" style="margin-top:-6px;border-radius:0!important;">
<div class="row"> <div class="row">
<div class="col px-0"> <div class="col px-0">
<a rel="nofollow noopener noreferrer" href="{{u.banner_url}}"> <a rel="nofollow noopener" href="{{u.banner_url}}">
<img alt="@{{u.username}}'s banner" onclick="expandDesktopImage()" loading="lazy" src="{{u.banner_url}}" width=100% style="object-fit:cover;max-height:30vh!important"> <img alt="@{{u.username}}'s banner" onclick="expandDesktopImage()" loading="lazy" src="{{u.banner_url}}" width=100% style="object-fit:cover;max-height:30vh!important">
</a> </a>
</div> </div>
@ -270,7 +270,7 @@
<div class="row border-bottom"> <div class="row border-bottom">
<div class="col"> <div class="col">
<div style="margin-top: -34px;" id="profile-mobile--pfp"> <div style="margin-top: -34px;" id="profile-mobile--pfp">
<a rel="nofollow noopener noreferrer" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-65-wrapper"> <a rel="nofollow noopener" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-65-wrapper">
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic-65 bg-white mb-2"> <img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic-65 bg-white mb-2">
{% if u.hat_active -%} {% if u.hat_active -%}
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-65-hat hat" loading="lazy" src="{{u.hat_active}}?h=7"> <img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-65-hat hat" loading="lazy" src="{{u.hat_active}}?h=7">
@ -388,7 +388,7 @@
<div class="mb-3" id="profile-mobile--badges"> <div class="mb-3" id="profile-mobile--badges">
{% for b in u.badges %} {% for b in u.badges %}
{% if b.url %} {% if b.url %}
<a rel="nofollow noopener noreferrer" href="{{b.url}}"> <a rel="nofollow noopener" href="{{b.url}}">
<img class="contain" alt="{{b.name}}" width=29.33 height=32 loading="lazy" src="{{b.path}}?b=4" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{b.text}}" {% if b.until %}data-until="{{b.until}}" onmouseover="badge_timestamp(this)"{% endif %}> <img class="contain" alt="{{b.name}}" width=29.33 height=32 loading="lazy" src="{{b.path}}?b=4" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{b.text}}" {% if b.until %}data-until="{{b.until}}" onmouseover="badge_timestamp(this)"{% endif %}>
</a> </a>
{% else %} {% else %}

View File

@ -4,6 +4,10 @@ server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
add_header Referrer-Policy "same-origin";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
add_header X-Frame-Options "deny";
add_header X-Content-Type-Options "nosniff";
location / { location / {
proxy_pass http://localhost:5000/; proxy_pass http://localhost:5000/;