mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 06:27:03 +01:00
Add cachebuster to embedjs
This commit is contained in:
parent
c45c98dfb9
commit
d067e17cbd
@ -22,6 +22,9 @@ import titanembeds.constants as constants
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import datetime
|
import datetime
|
||||||
import random
|
import random
|
||||||
|
import time
|
||||||
|
|
||||||
|
app_start_stamp = time.time()
|
||||||
|
|
||||||
os.chdir(config['app-location'])
|
os.chdir(config['app-location'])
|
||||||
app = Flask(__name__, static_folder="static")
|
app = Flask(__name__, static_folder="static")
|
||||||
@ -97,7 +100,8 @@ def context_processor():
|
|||||||
"sentry_js_dsn": config.get("sentry-js-dsn", None),
|
"sentry_js_dsn": config.get("sentry-js-dsn", None),
|
||||||
"constants": constants,
|
"constants": constants,
|
||||||
"af_mode_enabled": datetime.datetime.now().date() == datetime.date(datetime.datetime.now().year, 4, 1),
|
"af_mode_enabled": datetime.datetime.now().date() == datetime.date(datetime.datetime.now().year, 4, 1),
|
||||||
"dbl_voted": session.get("unauthenticated", True) == False and bool(redis_store.get("DiscordBotsOrgVoted/" + str(session.get("user_id", -1))))
|
"dbl_voted": session.get("unauthenticated", True) == False and bool(redis_store.get("DiscordBotsOrgVoted/" + str(session.get("user_id", -1)))),
|
||||||
|
"app_start_stamp": app_start_stamp
|
||||||
}
|
}
|
||||||
|
|
||||||
# @app.errorhandler(500)
|
# @app.errorhandler(500)
|
||||||
|
@ -634,7 +634,7 @@
|
|||||||
const cookie_test_s2_URL = {{ url_for("embed.cookietest2", _external=True)|tojson|safe }};
|
const cookie_test_s2_URL = {{ url_for("embed.cookietest2", _external=True)|tojson|safe }};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="{{ url_for('static', filename='js/embed.js') }}"></script>
|
<script type="text/javascript" src="{{ url_for('static', filename='js/embed.js', t=app_start_stamp) }}"></script>
|
||||||
|
|
||||||
{% if af_mode_enabled %}
|
{% if af_mode_enabled %}
|
||||||
<script type="text/javascript" src="{{ url_for('static', filename='js/embed.af.directmessage.js') }}"></script>
|
<script type="text/javascript" src="{{ url_for('static', filename='js/embed.af.directmessage.js') }}"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user