forked from MarseyWorld/MarseyWorld
fsd
parent
cd4e9b6932
commit
6d3831e689
|
@ -102,6 +102,9 @@ def before_request():
|
|||
url = request.url.replace("http://", "https://", 1)
|
||||
return redirect(url, code=301)
|
||||
|
||||
if '; wv) ' in request.headers.get("User-Agent",""): g.webview = True
|
||||
else: g.webview = False
|
||||
|
||||
@app.teardown_appcontext
|
||||
def teardown_request(error):
|
||||
if hasattr(g, 'db') and g.db:
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="settings-section rounded">
|
||||
<div class="d-lg-flex">
|
||||
<div class="title w-lg-25">
|
||||
<label for="over18"><a href="{{app.permalink}}" {% if v and v.newtab %}target="_blank"{% endif %}>{{app.app_name}}</a></label>
|
||||
<label for="over18"><a href="{{app.permalink}}" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>{{app.app_name}}</a></label>
|
||||
</div>
|
||||
<div class="body w-lg-100">
|
||||
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<span class="text-black">coins</span>
|
||||
</span>
|
||||
|
||||
<a {% if v and v.newtab %}target="_blank"{% endif %} class="pop-viewmore ml-auto text-decoration-none">
|
||||
<a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} class="pop-viewmore ml-auto text-decoration-none">
|
||||
View
|
||||
<i class="fas fa-arrow-right fa-sm px-1"></i>
|
||||
</a>
|
||||
|
@ -296,7 +296,7 @@
|
|||
<a id="cancel-edit-{{c.id}}" href="javascript:void(0)" onclick="toggleEdit('{{c.id}}')" class="btn btn-link text-muted ml-auto cancel-form fl-r commentmob">Cancel</a>
|
||||
</form>
|
||||
<div id="preview-edit-{{c.id}}" class="preview-edit mb-3 mt-5"></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="comment-{{c.id}}-actions" class="comment-actions{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
|
||||
|
@ -526,7 +526,7 @@
|
|||
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('d-none')" class="btn btn-link text-muted ml-auto cancel-form fl-r commentmob">Cancel</a>
|
||||
</form>
|
||||
<div id="reply-edit-{{c.id}}" class="mb-3 mt-5"></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -38,11 +38,11 @@
|
|||
|
||||
{% elif v %}
|
||||
|
||||
<p>Please <a {% if v and v.newtab %}target="_blank"{% endif %} href="/settings/security">verify your email address</a> in order to ensure we can respond to your message if needed. Then, refresh this page.</p>
|
||||
<p>Please <a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="/settings/security">verify your email address</a> in order to ensure we can respond to your message if needed. Then, refresh this page.</p>
|
||||
|
||||
{% else %}
|
||||
|
||||
<p>In order to ensure that we can respond to your message, please first <a href="/signup" {% if v and v.newtab %}target="_blank"{% endif %}>sign up</a> or <a href="/login" {% if v and v.newtab %}target="_blank"{% endif %}>log in</a> and make sure you have <a {% if v and v.newtab %}target="_blank"{% endif %} href="/settings/security">verified your email address</a>. Then, refresh this page.</p>
|
||||
<p>In order to ensure that we can respond to your message, please first <a href="/signup" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>sign up</a> or <a href="/login" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>log in</a> and make sure you have <a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="/settings/security">verified your email address</a>. Then, refresh this page.</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<div class="custom-control custom-checkbox mt-4">
|
||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="termsCheck" required>
|
||||
<label class="custom-control-label terms" for="termsCheck">I accept the <a
|
||||
href="/rules" {% if v and v.newtab %}target="_blank"{% endif %}>terms and conditions</a></label>
|
||||
href="/rules" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>terms and conditions</a></label>
|
||||
</div>
|
||||
|
||||
{% if hcaptcha %}
|
||||
|
|
|
@ -481,7 +481,7 @@
|
|||
<a href="javascript:void(0)" onclick="togglePostEdit('{{p.id}}')" class="btn btn-link text-muted ml-auto cancel-form fl-r">Cancel</a>
|
||||
</form>
|
||||
<div id="post-edit-{{p.id}}" class="mb-3 mt-5"></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
@ -752,7 +752,7 @@
|
|||
<a id="save-reply-to-{{p.fullname}}" href="javascript:void(0)" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
|
||||
</form>
|
||||
<div id="form-preview-{{p.id}}" class="mb-3 mt-5"></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
</div>
|
||||
|
||||
{% if not v and not p.is_banned %}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<span class="text-black">coins</span>
|
||||
</span>
|
||||
|
||||
<a {% if v and v.newtab %}target="_blank"{% endif %} class="pop-viewmore ml-auto text-decoration-none">
|
||||
<a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} class="pop-viewmore ml-auto text-decoration-none">
|
||||
View
|
||||
<i class="fas fa-arrow-right fa-sm px-1"></i>
|
||||
</a>
|
||||
|
@ -137,7 +137,7 @@
|
|||
{% if p.club and not (v and (v.paid_dues or v.id == p.author_id)) %}
|
||||
<img alt="post thumnail" loading="lazy" src="/static/assets/images/emojis/marseyglow.webp" class="post-img">
|
||||
{% elif not p.url %}
|
||||
<a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}">
|
||||
<a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="{{p.permalink}}">
|
||||
<img alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
||||
</a>
|
||||
{% elif p.is_image %}
|
||||
|
@ -196,14 +196,14 @@
|
|||
<a class="user-name text-decoration-none" onclick='popclick({{p.author.json_popover(v) | tojson}})' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="focus" data-content-id="popover" href="javascript:void(0)" tabindex="0" style="color: #{{p.author.namecolor}}; font-weight: bold;"><img alt="@{{p.author.profile_url}}'s profile picture" loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"><span {% if p.author.patron and not p.distinguish_level %}class="patron" style="background-color:#{{p.author.namecolor}};"{% elif p.distinguish_level and 'rama' in request.host %}class="mod"{% endif %}>{{p.author.username}}</span></a>{% if p.author.customtitle %}<bdi style="color: #{{p.author.titlecolor}}"> {% if p.author.quadrant %}<img alt="{{p.author.quadrant}} quadrant" loading="lazy" height="20" src="/static/assets/images/quadrants/{{p.author.quadrant}}.webp?a=3">{% endif %}{{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<span data-bs-toggle="tooltip" data-bs-placement="bottom" onmouseover="timestamp('timestamp-{{p.id}}','{{p.created_utc}}')" id="timestamp-{{p.id}}"> {{p.age_string}}</span>
|
||||
|
||||
({% if p.is_image %}image post{% elif p.is_video %}video post{% elif p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" {% if v and v.newtab %}target="_blank"{% endif %}>{{p.domain}}</a>{% else %}text post{% endif %})
|
||||
({% if p.is_image %}image post{% elif p.is_video %}video post{% elif p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>{{p.domain}}</a>{% else %}text post{% endif %})
|
||||
{% if p.edited_utc %}
|
||||
Edited <span data-bs-toggle="tooltip" data-bs-placement="bottom" id="edited_timestamp-{{p.id}}" onmouseover="timestamp('edited_timestamp-{{p.id}}','{{p.edited_utc}}')">{{p.edited_string}}</span>
|
||||
{% endif %}
|
||||
{{p.views}} views
|
||||
</div>
|
||||
|
||||
<h5 class="card-title post-title text-left w-lg-75 mb-0 pb-0 pb-md-1"><a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}" class="stretched-link {% if p.author.agendaposter %}agendaposter{% endif %}">
|
||||
<h5 class="card-title post-title text-left w-lg-75 mb-0 pb-0 pb-md-1"><a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="{{p.permalink}}" class="stretched-link {% if p.author.agendaposter %}agendaposter{% 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 %}
|
||||
{{p.realtitle(v) | safe}}
|
||||
|
@ -215,7 +215,7 @@
|
|||
<a class="list-inline-item" href="javascript:void(0)" onclick="expandText('{{p.id}}')"><i class="fas fa-expand-alt mr-0 text-expand-icon-{{p.id}}"></i></a>
|
||||
{% endif %}
|
||||
<li class="list-inline-item">
|
||||
<a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}">
|
||||
<a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="{{p.permalink}}">
|
||||
<i class="fas fa-comment-dots"></i>{{p.comment_count}}
|
||||
<span class="text-info d-none new-comments"></span>
|
||||
</a>
|
||||
|
@ -310,7 +310,7 @@
|
|||
<div class="post-actions">
|
||||
<ul class="list-inline text-right d-flex">
|
||||
<li class="list-inline-item mr-auto">
|
||||
<a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}">
|
||||
<a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="{{p.permalink}}">
|
||||
<i class="fas fa-comment-dots"></i>{{p.comment_count}}
|
||||
<span class="text-info d-none new-comments"></span>
|
||||
</a>
|
||||
|
@ -517,7 +517,7 @@
|
|||
|
||||
{% if p.is_image and not p.over_18 and ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}
|
||||
<div style="text-align: center" class="mt-3 mb-4">
|
||||
<a {% if v and v.newtab %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.url}}">
|
||||
<a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.url}}">
|
||||
<img loading="lazy" src="/static/assets/images/loading.webp" data-src="{{p.url}}" class="img-fluid" style="max-height:20rem;" alt="Unable to load image">
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
</label>
|
||||
|
||||
<pre></pre>
|
||||
<div class="form-text text-small"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
<div class="form-text text-small"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
<pre></pre>
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
|
|
Loading…
Reference in New Issue