forked from rDrama/rDrama
sdfMerge branch 'master' of https://github.com/Aevann1/Drama
commit
2ec75be1f8
|
@ -1 +0,0 @@
|
|||
importScripts();
|
|
@ -8,11 +8,9 @@ def lazy(f):
|
|||
|
||||
o = args[0]
|
||||
|
||||
if "_lazy" not in o.__dict__:
|
||||
o.__dict__["_lazy"] = {}
|
||||
if "_lazy" not in o.__dict__: o.__dict__["_lazy"] = {}
|
||||
|
||||
if f.__name__ not in o.__dict__["_lazy"]:
|
||||
o.__dict__["_lazy"][f.__name__] = f(*args, **kwargs)
|
||||
if f.__name__ not in o.__dict__["_lazy"]: o.__dict__["_lazy"][f.__name__] = f(*args, **kwargs)
|
||||
|
||||
return o.__dict__["_lazy"][f.__name__]
|
||||
|
||||
|
|
|
@ -132,10 +132,6 @@ def log_item(id, v):
|
|||
action=action
|
||||
)
|
||||
|
||||
@app.route("/sex")
|
||||
def index():
|
||||
return render_template("index.html", **{"greeting": "Hello from Flask!"})
|
||||
|
||||
@app.get("/assets/favicon.ico")
|
||||
def favicon():
|
||||
return send_file(f"./assets/images/{site_name}/icon.webp")
|
||||
|
@ -248,8 +244,7 @@ def googleplayapp():
|
|||
|
||||
@app.route("/service-worker.js")
|
||||
def serviceworker():
|
||||
return redirect("https://js.pusher.com/beams/service-worker.js")
|
||||
|
||||
with open("files/assets/js/service-worker.js", "r") as f: return Response(f.read(), mimetype='application/javascript')
|
||||
|
||||
@app.get("/settings/security")
|
||||
@auth_required
|
||||
|
|
|
@ -156,5 +156,5 @@ def api_vote_comment(comment_id, new, v):
|
|||
comment.downvotes = g.db.query(CommentVote).options(lazyload('*')).filter_by(comment_id=comment.id, vote_type=-1).count()
|
||||
g.db.add(comment)
|
||||
g.db.commit()
|
||||
except: g.db.rolleback()
|
||||
except: g.db.rollback()
|
||||
return "", 204
|
|
@ -209,8 +209,8 @@
|
|||
|
||||
{% if p.award_count("stars") %}
|
||||
<script src="/assets/js/star.js" type="text/javascript"></script>
|
||||
{% set minbugs = 30*p.award_count("stars") if p.award_count("stars") <= 5 else 100 %}
|
||||
{% set maxbugs = 60*p.award_count("stars") if p.award_count("stars") <= 5 else 200 %}
|
||||
{% set minbugs = 10*p.award_count("stars") if p.award_count("stars") <= 5 else 50 %}
|
||||
{% set maxbugs = 20*p.award_count("stars") if p.award_count("stars") <= 5 else 100 %}
|
||||
<script type="text/javascript">
|
||||
new BugController({
|
||||
imageSprite: "/assets/images/star.png",
|
||||
|
|
Loading…
Reference in New Issue