get rid of some TODOs
parent
3edef755fa
commit
b74ba0a317
|
@ -1,4 +1,3 @@
|
|||
// TODO: Refactor this ugly shit who wrote this lmao
|
||||
function vote(type, id, dir) {
|
||||
const upvotes = document.getElementsByClassName(type + '-' + id + '-up');
|
||||
const downvotes = document.getElementsByClassName(type + '-' + id + '-down');
|
||||
|
|
|
@ -1079,7 +1079,6 @@ class User(Base):
|
|||
|
||||
|
||||
def get_relationship_count(self, relationship_cls):
|
||||
# TODO: deduplicate (see routes/users.py)
|
||||
if relationship_cls in {SaveRelationship, Subscription}:
|
||||
query = relationship_cls.post_id
|
||||
join = relationship_cls.post
|
||||
|
|
|
@ -857,7 +857,6 @@ approved_embed_hosts = [
|
|||
# 2) Cannot have open redirects based on query string. (tightest constraint)
|
||||
# 3) #2 but pre-stored, ex: s.lain.la 302 with jannie DM attack.
|
||||
# 4) Use the exact subdomain.
|
||||
### TODO: Run a media proxy and kill most of these. Impossible to review.
|
||||
|
||||
### First-Party
|
||||
'rdrama.net',
|
||||
|
@ -867,7 +866,6 @@ approved_embed_hosts = [
|
|||
'videos.watchpeopledie.tv',
|
||||
|
||||
### Third-Party Image Hosts
|
||||
# TODO: Might be able to keep these even if we media proxy?
|
||||
'i.imgur.com',
|
||||
'i.imgur.io',
|
||||
'pomf2.lain.la/f',
|
||||
|
@ -885,7 +883,6 @@ approved_embed_hosts = [
|
|||
'files.catbox.moe',
|
||||
|
||||
### Third-Party Media
|
||||
# TODO: Preferably kill these. Media proxy.
|
||||
# DO NOT ADD: wordpress.com, wp.com (maybe) | Or frankly anything. No more.
|
||||
'i.redd.it',
|
||||
'preview.redd.it',
|
||||
|
|
|
@ -906,7 +906,6 @@ def complies_with_chud(obj):
|
|||
#perserve old body_html to be used in checking for chud phrase
|
||||
old_body_html = obj.body_html
|
||||
|
||||
# TODO: Replace this code to make it more generic
|
||||
#torture body_html
|
||||
if obj.body_html and '<p>&&' not in obj.body_html and '<p>$$' not in obj.body_html and '<p>##' not in obj.body_html:
|
||||
soup = BeautifulSoup(obj.body_html, 'lxml')
|
||||
|
|
|
@ -56,7 +56,6 @@ def template_change_arg(arg, value, url):
|
|||
|
||||
@app.template_filter("asset_siteimg")
|
||||
def template_asset_siteimg(asset_path):
|
||||
# TODO: Add hashing for these using files.helpers.assetcache
|
||||
return f'{SITE_FULL_IMAGES}/i/{SITE_NAME}/{asset_path}?x=6'
|
||||
|
||||
@app.template_filter("timestamp")
|
||||
|
|
|
@ -152,7 +152,7 @@ def post_id(pid, v, anything=None, sub=None):
|
|||
if p.comment_count > threshold+25 and not (v and v.client):
|
||||
comments2 = []
|
||||
count = 0
|
||||
if p.created_utc > 1638672040: # TODO: migrate old comments to use top_comment_id
|
||||
if p.created_utc > 1638672040:
|
||||
for comment in comments:
|
||||
comments2.append(comment)
|
||||
ids.add(comment.id)
|
||||
|
@ -231,7 +231,7 @@ def view_more(v, pid, sort, offset):
|
|||
|
||||
comments2 = []
|
||||
count = 0
|
||||
if p.created_utc > 1638672040: # TODO: migrate old comments to use top_comment_id
|
||||
if p.created_utc > 1638672040:
|
||||
for comment in comments:
|
||||
comments2.append(comment)
|
||||
ids.add(comment.id)
|
||||
|
|
Loading…
Reference in New Issue