forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-08-25 15:53:24 +02:00
parent 0fe6712b98
commit 965febc0a8
2 changed files with 4 additions and 5 deletions

View File

@ -62,9 +62,9 @@ def get_logged_in_user():
v.last_active = timestamp v.last_active = timestamp
g.db.add(v) g.db.add(v)
else: else:
ua = str(user_agents.parse(g.agent)) g.parsed_agent = str(user_agents.parse(g.agent))
if 'spider' not in ua.lower() and 'bot' not in ua.lower(): if 'spider' not in g.parsed_agent.lower() and 'bot' not in g.parsed_agent.lower():
loggedout[session["session_id"]] = (timestamp, ua) loggedout[session["session_id"]] = (timestamp, g.parsed_agent)
g.loggedin_counter = len([x for x in loggedin.values() if timestamp-x < LOGGEDIN_ACTIVE_TIME]) g.loggedin_counter = len([x for x in loggedin.values() if timestamp-x < LOGGEDIN_ACTIVE_TIME])
cache.set(f'{SITE}_loggedin', loggedin) cache.set(f'{SITE}_loggedin', loggedin)

View File

@ -945,8 +945,7 @@
<div id="viewmore-{{offset}}"><button id="viewbtn" class="btn btn-primary" onclick="viewmore({{pid}},'{{sort}}',{{offset}},{{ids}})">VIEW MORE COMMENTS</a></div> <div id="viewmore-{{offset}}"><button id="viewbtn" class="btn btn-primary" onclick="viewmore({{pid}},'{{sort}}',{{offset}},{{ids}})">VIEW MORE COMMENTS</a></div>
{% endif %} {% endif %}
{# if SITE == 'rdrama.net' and not ajax and v and v.theme == 'midnight' #} {% if SITE == 'rdrama.net' and not ajax and v and v.theme == 'midnight' and 'Samsung Internet' not in g.parsed_agent %}
{% if False %}
<script> <script>
const markTemplate = (name) => { const markTemplate = (name) => {
return `<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='50px' height='50px'><text transform='translate(10, 50) rotate(-45)' fill='rgba(45,45,45,0.1)' font-size='20'>${name}</text></svg>`; return `<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='50px' height='50px'><text transform='translate(10, 50) rotate(-45)' fill='rgba(45,45,45,0.1)' font-size='20'>${name}</text></svg>`;