Add trailing LF to text files

This commit is contained in:
iro84657 2022-05-10 21:02:56 -04:00
parent 1edc96841b
commit b7da8b575a
175 changed files with 175 additions and 175 deletions

View file

@ -3,4 +3,4 @@ updates:
- package-ecosystem: "pip" - package-ecosystem: "pip"
directory: "/" directory: "/"
schedule: schedule:
interval: "daily" interval: "daily"

View file

@ -34,4 +34,4 @@ services:
environment: environment:
- POSTGRES_HOST_AUTH_METHOD=trust - POSTGRES_HOST_AUTH_METHOD=trust
ports: ports:
- "5432:5432" - "5432:5432"

View file

@ -148,4 +148,4 @@ blockquote a {
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #949494 !important; color: #949494 !important;
} }

View file

@ -521,4 +521,4 @@ a.nav-link:hover {
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #6e6e6e !important; color: #6e6e6e !important;
} }

View file

@ -203,4 +203,4 @@ a.nav-link:hover {
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #6e6e6e !important; color: #6e6e6e !important;
} }

View file

@ -100,4 +100,4 @@ blockquote {
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #949494 !important; color: #949494 !important;
} }

View file

@ -69,4 +69,4 @@ pre {
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #7a7a7a !important; color: #7a7a7a !important;
} }

View file

@ -136,4 +136,4 @@ color: var(--gray-700);
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #6e6e6e !important; color: #6e6e6e !important;
} }

View file

@ -82,4 +82,4 @@ blockquote {
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #7a7a7a !important; color: #7a7a7a !important;
} }

View file

@ -44,4 +44,4 @@ body, .navbar-light, .navbar-dark, .card, .modal-content, .comment-write textare
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #6e6e6e !important; color: #6e6e6e !important;
} }

View file

@ -73,4 +73,4 @@ pre {
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #7a7a7a !important; color: #7a7a7a !important;
} }

View file

@ -221,4 +221,4 @@
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #b0b0b0 !important; color: #b0b0b0 !important;
} }

View file

@ -162,4 +162,4 @@ blockquote {
#frontpage .post-title a:visited, .visited { #frontpage .post-title a:visited, .visited {
color: #5c5c5c !important; color: #5c5c5c !important;
} }

View file

@ -148,4 +148,4 @@ function buy(mb) {
xhr.send(form); xhr.send(form);
} }

View file

@ -19,4 +19,4 @@ function banModal(link, id, name) {
xhr.send(fd); xhr.send(fd);
} }
} }

View file

@ -4,4 +4,4 @@ new BugController({
minBugs: 10, minBugs: 10,
maxBugs: 20, maxBugs: 20,
mouseOver: "multiply" mouseOver: "multiply"
}); });

View file

@ -160,4 +160,4 @@ socket.on('typing', function (users){
} }
}) })
box.scrollTo(0, box.scrollHeight) box.scrollTo(0, box.scrollHeight)

View file

@ -4,4 +4,4 @@ var clipboard = new ClipboardJS('.copy-link');
clipboard.on('success', function(e) { clipboard.on('success', function(e) {
var myToast = bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-success')); var myToast = bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-success'));
myToast.show(); myToast.show();
}); });

View file

@ -93,4 +93,4 @@ function bet_vote(cid) {
scoretext.textContent = score + 1; scoretext.textContent = score + 1;
post('/bet/' + cid); post('/bet/' + cid);
document.getElementById("user-coins-amount").innerText = parseInt(document.getElementById("user-coins-amount").innerText) - 200; document.getElementById("user-coins-amount").innerText = parseInt(document.getElementById("user-coins-amount").innerText) - 200;
} }

View file

@ -27,4 +27,4 @@ function expandMarkdown(t,id) {
let val = t.getElementsByTagName('span')[0] let val = t.getElementsByTagName('span')[0]
if (val.innerHTML == 'View source') val.innerHTML = 'Hide source' if (val.innerHTML == 'View source') val.innerHTML = 'Hide source'
else val.innerHTML = 'View source' else val.innerHTML = 'View source'
}; };

View file

@ -71,4 +71,4 @@ function approveComment2(post_id,button1,button2) {
document.getElementById(button1).classList.toggle("d-none"); document.getElementById(button1).classList.toggle("d-none");
document.getElementById(button2).classList.toggle("d-none"); document.getElementById(button2).classList.toggle("d-none");
} }
} }

View file

@ -340,4 +340,4 @@ function handle_action(type, cid, thing) {
}, 2000); }, 2000);
} }
xhr.send(form) xhr.send(form)
} }

View file

@ -30,4 +30,4 @@ c;g.dropping(c,b,e,f,a)})},dropping:function(a,b,c,d,e){a-=this._lastTimestamp;v
(2*a+b%2)*c.options.bugWidth+"px 100%";c.twitch(a,++b)},c.random(300,800))},this.random(1E3,1E4))},rad2deg:function(a){return a*this.rad2deg_k},deg2rad:function(a){return a*this.deg2rad_k},random:function(a,b,c){if(a==b)return a;a=Math.round(a-.5+Math.random()*(b-a+1));return c?.5<Math.random()?a:-a:a},next_small_turn:function(){this.small_turn_counter=Math.round(10*Math.random())},next_large_turn:function(){this.large_turn_counter=Math.round(40*Math.random())},next_stationary:function(){this.toggle_stationary_counter= (2*a+b%2)*c.options.bugWidth+"px 100%";c.twitch(a,++b)},c.random(300,800))},this.random(1E3,1E4))},rad2deg:function(a){return a*this.rad2deg_k},deg2rad:function(a){return a*this.deg2rad_k},random:function(a,b,c){if(a==b)return a;a=Math.round(a-.5+Math.random()*(b-a+1));return c?.5<Math.random()?a:-a:a},next_small_turn:function(){this.small_turn_counter=Math.round(10*Math.random())},next_large_turn:function(){this.large_turn_counter=Math.round(40*Math.random())},next_stationary:function(){this.toggle_stationary_counter=
this.random(50,300)},bug_near_window_edge:function(){this.near_edge=0;this.bug.top<this.options.edge_resistance?this.near_edge|=this.NEAR_TOP_EDGE:this.bug.top>document.documentElement.clientHeight-this.options.edge_resistance&&(this.near_edge|=this.NEAR_BOTTOM_EDGE);this.bug.left<this.options.edge_resistance?this.near_edge|=this.NEAR_LEFT_EDGE:this.bug.left>document.documentElement.clientWidth-this.options.edge_resistance&&(this.near_edge|=this.NEAR_RIGHT_EDGE);return this.near_edge},getPos:function(){return this.inserted&& this.random(50,300)},bug_near_window_edge:function(){this.near_edge=0;this.bug.top<this.options.edge_resistance?this.near_edge|=this.NEAR_TOP_EDGE:this.bug.top>document.documentElement.clientHeight-this.options.edge_resistance&&(this.near_edge|=this.NEAR_BOTTOM_EDGE);this.bug.left<this.options.edge_resistance?this.near_edge|=this.NEAR_LEFT_EDGE:this.bug.left>document.documentElement.clientWidth-this.options.edge_resistance&&(this.near_edge|=this.NEAR_RIGHT_EDGE);return this.near_edge},getPos:function(){return this.inserted&&
this.bug&&this.bug.style?{top:parseInt(this.bug.top,10),left:parseInt(this.bug.left,10)}:null}},SpawnBug=function(){var a={},b;for(b in Bug)Bug.hasOwnProperty(b)&&(a[b]=Bug[b]);return a},mergeOptions=function(a,b,c){"undefined"==typeof c&&(c=!0);a=c?cloneOf(a):a;for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return a},cloneOf=function(a){if(null==a||"object"!=typeof a)return a;var b=a.constructor(),c;for(c in a)a.hasOwnProperty(c)&&(b[c]=cloneOf(a[c]));return b}; this.bug&&this.bug.style?{top:parseInt(this.bug.top,10),left:parseInt(this.bug.left,10)}:null}},SpawnBug=function(){var a={},b;for(b in Bug)Bug.hasOwnProperty(b)&&(a[b]=Bug[b]);return a},mergeOptions=function(a,b,c){"undefined"==typeof c&&(c=!0);a=c?cloneOf(a):a;for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return a},cloneOf=function(a){if(null==a||"object"!=typeof a)return a;var b=a.constructor(),c;for(c in a)a.hasOwnProperty(c)&&(b[c]=cloneOf(a[c]));return b};
window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,b){window.setTimeout(a,1E3/60)}}(); window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,b){window.setTimeout(a,1E3/60)}}();

View file

@ -25,4 +25,4 @@ function delete_postModal(id) {
}; };
xhr.send(form); xhr.send(form);
}; };
} }

View file

@ -155,4 +155,4 @@ function getEmoji(searchTerm) {
if (favorite_emojis[searchTerm]) favorite_emojis[searchTerm] += 1 if (favorite_emojis[searchTerm]) favorite_emojis[searchTerm] += 1
else favorite_emojis[searchTerm] = 1 else favorite_emojis[searchTerm] = 1
localStorage.setItem("favorite_emojis", JSON.stringify(favorite_emojis)) localStorage.setItem("favorite_emojis", JSON.stringify(favorite_emojis))
} }

View file

@ -4,4 +4,4 @@ new BugController({
minBugs: 10, minBugs: 10,
maxBugs: 30, maxBugs: 30,
mouseOver: "multiply" mouseOver: "multiply"
}); });

View file

@ -2,4 +2,4 @@ function removeFollower(event, username) {
post_toast(event.target,'/remove_follow/' + username); post_toast(event.target,'/remove_follow/' + username);
let table = document.getElementById("followers-table"); let table = document.getElementById("followers-table");
table.removeChild(event.target.parentElement.parentElement); table.removeChild(event.target.parentElement.parentElement);
} }

View file

@ -2,4 +2,4 @@ function removeFollowing(event, username) {
post_toast(event.target,'/unfollow/' + username); post_toast(event.target,'/unfollow/' + username);
let table = document.getElementById("followers-table"); let table = document.getElementById("followers-table");
table.removeChild(event.target.parentElement.parentElement); table.removeChild(event.target.parentElement.parentElement);
} }

View file

@ -54,4 +54,4 @@ function makeQuote(form) {
else { else {
text.value = text.value.substring(0, startIndex) + format + selectedText + text.value.substring(endIndex); text.value = text.value.substring(0, startIndex) + format + selectedText + text.value.substring(endIndex);
} }
} }

View file

@ -79,4 +79,4 @@ function insertGIF(url,form) {
commentBox.value = old + gif; commentBox.value = old + gif;
if (typeof checkForRequired === "function") checkForRequired(); if (typeof checkForRequired === "function") checkForRequired();
} }

View file

@ -121,4 +121,4 @@ function changename(s1,s2) {
filename += e.name.substr(0, 20) + ', '; filename += e.name.substr(0, 20) + ', ';
} }
document.getElementById(s1).innerHTML = escapeHTML(filename.slice(0, -2)); document.getElementById(s1).innerHTML = escapeHTML(filename.slice(0, -2));
} }

View file

@ -61,4 +61,4 @@
iframeEl.focus(); iframeEl.focus();
} }
} }
customElements.define('lite-youtube', LiteYTEmbed); customElements.define('lite-youtube', LiteYTEmbed);

View file

@ -14,4 +14,4 @@ for (const e of images) {
document.getElementById("desktop-expanded-image-link").href = image; document.getElementById("desktop-expanded-image-link").href = image;
document.getElementById("desktop-expanded-image-wrap-link").href = image; document.getElementById("desktop-expanded-image-wrap-link").href = image;
} }
} }

View file

@ -68,4 +68,4 @@ function charLimit(form, text) {
} }
text.innerText = length + ' / ' + maxLength; text.innerText = length + ' / ' + maxLength;
} }

View file

@ -41,4 +41,4 @@ window.onscroll = function () {
} }
} }
prevScrollpos = currentScrollPos; prevScrollpos = currentScrollPos;
} }

View file

@ -38,4 +38,4 @@ if (typeof showNewCommentCounts === 'undefined') {
} }
setTimeout(cleanCache, 500) setTimeout(cleanCache, 500)
} }

View file

@ -39,4 +39,4 @@ function post_toast2(t, url, button1, button2) {
}; };
xhr.send(form); xhr.send(form);
} }

View file

@ -2611,4 +2611,4 @@ beamsClient.start()
.then((beamsClient) => beamsClient.getDeviceId()) .then((beamsClient) => beamsClient.getDeviceId())
.then(() => beamsClient.addDeviceInterest(strid)) .then(() => beamsClient.addDeviceInterest(strid))
.then(() => beamsClient.getDeviceInterests()) .then(() => beamsClient.getDeviceInterests())
.catch(console.error); .catch(console.error);

View file

@ -32,4 +32,4 @@ function report_postModal(id) {
xhr.send(form); xhr.send(form);
} }
}; };

View file

@ -1 +1 @@
importScripts("https://js.pusher.com/beams/service-worker.js"); importScripts("https://js.pusher.com/beams/service-worker.js");

View file

@ -28,4 +28,4 @@ function block_user() {
} }
xhr.send(f) xhr.send(f)
} }
} }

View file

@ -56,4 +56,4 @@ document.onpaste = function(event) {
document.getElementById('filename-show').textContent = filename; document.getElementById('filename-show').textContent = filename;
} }
} }
} }

View file

@ -7,4 +7,4 @@ const twoStepModal = new bootstrap.Modal(document.getElementById('2faModal'))
function emailVerifyText() { function emailVerifyText() {
document.getElementById("email-verify-text").innerHTML = "Verification email sent! Please check your inbox."; document.getElementById("email-verify-text").innerHTML = "Verification email sent! Please check your inbox.";
} }

View file

@ -38,4 +38,4 @@ document.getElementById('username-register').addEventListener('input', function
}) })
} }
} }
}); });

View file

@ -24,4 +24,4 @@ function sort_table(n) {
switchcount ++; switchcount ++;
} }
} }
} }

View file

@ -13,4 +13,4 @@ function togglevideo(pid) {
let vid2 = document.getElementById(`video2-${pid}`) let vid2 = document.getElementById(`video2-${pid}`)
if (vid.contains('d-none')) vid2.pause() if (vid.contains('d-none')) vid2.pause()
else vid2.play() else vid2.play()
} }

View file

@ -161,4 +161,4 @@ function checkRepost(t) {
} }
xhr.send(form) xhr.send(form)
} }
} }

View file

@ -8,4 +8,4 @@ function togglePostEdit(id){
title.classList.toggle("d-none"); title.classList.toggle("d-none");
form.classList.toggle("d-none"); form.classList.toggle("d-none");
autoExpand(box); autoExpand(box);
}; };

View file

@ -50,4 +50,4 @@ else
}, {once : true}); }, {once : true});
} }
} }
} }

View file

@ -182,4 +182,4 @@ function submitFormAjax(e) {
xhr.send(formData); xhr.send(formData);
return false return false
} }

View file

@ -5,4 +5,4 @@
"display": "standalone", "display": "standalone",
"background_color": "#FFFFFF", "background_color": "#FFFFFF",
"description": "The Motte" "description": "The Motte"
} }

View file

@ -1,2 +1,2 @@
User-agent: * User-agent: *
Allow: / Allow: /

View file

@ -18,4 +18,4 @@ from .sub_block import *
from .saves import * from .saves import *
from .views import * from .views import *
from .notifications import * from .notifications import *
from .follows import * from .follows import *

View file

@ -81,4 +81,4 @@ class ClientAuth(Base):
@property @property
@lazy @lazy
def created_datetime(self): def created_datetime(self):
return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc)))

View file

@ -532,4 +532,4 @@ class Comment(Base):
body += f" <em class='text-success'>Insured.</em>" body += f" <em class='text-success'>Insured.</em>"
body += '</span>' body += '</span>'
return body return body

View file

@ -5,4 +5,4 @@ class BannedDomain(Base):
__tablename__ = "banneddomains" __tablename__ = "banneddomains"
domain = Column(String, primary_key=True) domain = Column(String, primary_key=True)
reason = Column(String) reason = Column(String)

View file

@ -12,4 +12,4 @@ class Exile(Base):
exiler = relationship("User", primaryjoin="User.id==Exile.exiler_id", viewonly=True) exiler = relationship("User", primaryjoin="User.id==Exile.exiler_id", viewonly=True)
def __repr__(self): def __repr__(self):
return f"<Exile(user_id={self.user_id}, sub={self.sub})>" return f"<Exile(user_id={self.user_id}, sub={self.sub})>"

View file

@ -68,4 +68,4 @@ class CommentFlag(Base):
@lazy @lazy
def realreason(self, v): def realreason(self, v):
return censor_slurs(self.reason, v) return censor_slurs(self.reason, v)

View file

@ -17,4 +17,4 @@ class Follow(Base):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
def __repr__(self): def __repr__(self):
return f"<Follow(id={self.id})>" return f"<Follow(id={self.id})>"

View file

@ -10,4 +10,4 @@ class Marsey(Base):
count = Column(Integer, default=0) count = Column(Integer, default=0)
def __repr__(self): def __repr__(self):
return f"<Marsey(name={self.name})>" return f"<Marsey(name={self.name})>"

View file

@ -21,4 +21,4 @@ class Mod(Base):
@property @property
@lazy @lazy
def created_datetime(self): def created_datetime(self):
return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc)))

View file

@ -421,4 +421,4 @@ ACTIONTYPES2 = deepcopy(ACTIONTYPES)
ACTIONTYPES2.pop("shadowban") ACTIONTYPES2.pop("shadowban")
ACTIONTYPES2.pop("unshadowban") ACTIONTYPES2.pop("unshadowban")
ACTIONTYPES2.pop("flair_post") ACTIONTYPES2.pop("flair_post")
ACTIONTYPES2.pop("edit_post") ACTIONTYPES2.pop("edit_post")

View file

@ -20,4 +20,4 @@ class Notification(Base):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
def __repr__(self): def __repr__(self):
return f"<Notification(id={self.id})>" return f"<Notification(id={self.id})>"

View file

@ -17,4 +17,4 @@ class CommentSaveRelationship(Base):
__tablename__="comment_save_relationship" __tablename__="comment_save_relationship"
user_id=Column(Integer, ForeignKey("users.id"), primary_key=True) user_id=Column(Integer, ForeignKey("users.id"), primary_key=True)
comment_id=Column(Integer, ForeignKey("comments.id"), primary_key=True) comment_id=Column(Integer, ForeignKey("comments.id"), primary_key=True)

View file

@ -46,4 +46,4 @@ class Sub(Base):
@property @property
@lazy @lazy
def block_num(self): def block_num(self):
return self.blocks.count() return self.blocks.count()

View file

@ -9,4 +9,4 @@ class SubBlock(Base):
sub = Column(String, ForeignKey("subs.name"), primary_key=True) sub = Column(String, ForeignKey("subs.name"), primary_key=True)
def __repr__(self): def __repr__(self):
return f"<SubBlock(user_id={self.user_id}, sub={self.sub})>" return f"<SubBlock(user_id={self.user_id}, sub={self.sub})>"

View file

@ -483,4 +483,4 @@ class Submission(Base):
return False return False
@lazy @lazy
def active_flags(self, v): return len(self.flags(v)) def active_flags(self, v): return len(self.flags(v))

View file

@ -13,4 +13,4 @@ class Subscription(Base):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
def __repr__(self): def __repr__(self):
return f"<Subscription(id={self.id})>" return f"<Subscription(id={self.id})>"

View file

@ -12,4 +12,4 @@ class UserBlock(Base):
target = relationship("User", primaryjoin="User.id==UserBlock.target_id", viewonly=True) target = relationship("User", primaryjoin="User.id==UserBlock.target_id", viewonly=True)
def __repr__(self): def __repr__(self):
return f"<UserBlock(user={self.user_id}, target={self.target_id})>" return f"<UserBlock(user={self.user_id}, target={self.target_id})>"

View file

@ -84,4 +84,4 @@ class CommentVote(Base):
data["user"]=self.user.json_core data["user"]=self.user.json_core
data["comment"]=self.comment.json_core data["comment"]=self.comment.json_core
return data return data

View file

@ -97,4 +97,4 @@ def NOTIFY_USERS(text, v):
user = get_user(i.group(2), graceful=True) user = get_user(i.group(2), graceful=True)
if user and v.id != user.id and not v.any_block_exists(user): notify_users.add(user.id) if user and v.id != user.id and not v.any_block_exists(user): notify_users.add(user.id)
return notify_users return notify_users

View file

@ -175,4 +175,4 @@ def apply_game_result(from_comment, wager, result, kind):
if (reward > -1): if (reward > -1):
currency_value = int(getattr(user, kind, 0)) currency_value = int(getattr(user, kind, 0))
setattr(user, kind, currency_value + wager_value + reward) setattr(user, kind, currency_value + wager_value + reward)

View file

@ -702,4 +702,4 @@ procoins_li = (0,2500,5000,10000,25000,50000,125000,250000)
linefeeds_regex = re.compile("([^\n])\n([^\n])", flags=re.A) linefeeds_regex = re.compile("([^\n])\n([^\n])", flags=re.A)
def make_name(*args, **kwargs): return request.base_url def make_name(*args, **kwargs): return request.base_url

View file

@ -63,4 +63,4 @@ def send_discord_message(message):
def send_cringetopia_message(message): def send_cringetopia_message(message):
headers = {"Authorization": f"Bot {BOT_TOKEN}"} headers = {"Authorization": f"Bot {BOT_TOKEN}"}
data={"content": message} data={"content": message}
requests.post("https://discordapp.com/api/channels/965264044531527740/messages", headers=headers, data=data, timeout=5) requests.post("https://discordapp.com/api/channels/965264044531527740/messages", headers=headers, data=data, timeout=5)

View file

@ -286,4 +286,4 @@ def get_domain(s):
doms = sorted(doms, key=lambda x: len(x.domain), reverse=True) doms = sorted(doms, key=lambda x: len(x.domain), reverse=True)
return doms[0] return doms[0]

View file

@ -25,4 +25,4 @@ def process_image(filename=None, resize=0):
i = ImageOps.exif_transpose(i) i = ImageOps.exif_transpose(i)
i.save(filename, format="WEBP", method=6) i.save(filename, format="WEBP", method=6)
return filename return filename

View file

@ -49,4 +49,4 @@ def timestamp(timestamp):
@app.context_processor @app.context_processor
def inject_constants(): def inject_constants():
return {"environ":environ, "SITE":SITE, "SITE_NAME":SITE_NAME, "SITE_FULL":SITE_FULL, "AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID, "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "PIZZASHILL_ID":PIZZASHILL_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR, "COLORS":COLORS, "ADMIGGERS":ADMIGGERS} return {"environ":environ, "SITE":SITE, "SITE_NAME":SITE_NAME, "SITE_FULL":SITE_FULL, "AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID, "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "PIZZASHILL_ID":PIZZASHILL_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR, "COLORS":COLORS, "ADMIGGERS":ADMIGGERS}

View file

@ -113,4 +113,4 @@ def build_text(wager_value, result, user, currency):
if result == 0: return f'Lost {wager_value} {currency}' if result == 0: return f'Lost {wager_value} {currency}'
elif result == 1: return 'Broke Even' elif result == 1: return 'Broke Even'
elif result == 12: return f'Jackpot! Won {wager_value * (result-1)} {currency}' elif result == 12: return f'Jackpot! Won {wager_value * (result-1)} {currency}'
else: return f'Won {wager_value * (result-1)} {currency}' else: return f'Won {wager_value * (result-1)} {currency}'

View file

@ -26,4 +26,4 @@ def check_for_treasure(in_text, from_comment):
user = from_comment.author user = from_comment.author
user.coins += amount user.coins += amount
from_comment.treasure_amount = str(amount) from_comment.treasure_amount = str(amount)

View file

@ -115,4 +115,4 @@ def admin_level_required(x):
wrapper.__name__ = f.__name__ wrapper.__name__ = f.__name__
return wrapper return wrapper
return wrapper_maker return wrapper_maker

View file

@ -15,4 +15,4 @@ from .votes import *
from .feeds import * from .feeds import *
from .awards import * from .awards import *
from .giphy import * from .giphy import *
# from .subs import * # from .subs import *

View file

@ -1627,4 +1627,4 @@ def admin_nunuke_user(v):
g.db.commit() g.db.commit()
return redirect(user.url) return redirect(user.url)

View file

@ -113,4 +113,4 @@ def close_running_threads():
cache.set(f'{SITE}_chat', messages) cache.set(f'{SITE}_chat', messages)
cache.set(f'{SITE}_total', total) cache.set(f'{SITE}_total', total)
cache.set(f'{SITE}_muted', muted) cache.set(f'{SITE}_muted', muted)
atexit.register(close_running_threads) atexit.register(close_running_threads)

View file

@ -922,4 +922,4 @@ def handle_wordle_action(cid, v):
g.db.add(comment) g.db.add(comment)
g.db.commit() g.db.commit()
return {"response" : comment.wordle_html(v)} return {"response" : comment.wordle_html(v)}

View file

@ -135,4 +135,4 @@ def discord_redirect(v):
g.db.commit() g.db.commit()
return redirect(f"https://discord.com/channels/{SERVER_ID}/{WELCOME_CHANNEL}") return redirect(f"https://discord.com/channels/{SERVER_ID}/{WELCOME_CHANNEL}")

View file

@ -73,4 +73,4 @@ def allow_nsfw():
if redir: if redir:
if redir.startswith(f'{SITE_FULL}/'): return redirect(redir) if redir.startswith(f'{SITE_FULL}/'): return redirect(redir)
if redir.startswith('/'): return redirect(f'{SITE_FULL}{redir}') if redir.startswith('/'): return redirect(f'{SITE_FULL}{redir}')
return redirect('/') return redirect('/')

View file

@ -66,4 +66,4 @@ def feeds_user(v=None, sort='hot', t='all'):
with tag("content", type="html"): with tag("content", type="html"):
doc.cdata(f'''<img alt="{post.realtitle(None)}" loading="lazy" src={image_url}><br>{post.realbody(None)}''') doc.cdata(f'''<img alt="{post.realtitle(None)}" loading="lazy" src={image_url}><br>{post.realbody(None)}''')
return Response( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+ doc.getvalue(), mimetype="application/xml") return Response( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+ doc.getvalue(), mimetype="application/xml")

View file

@ -593,4 +593,4 @@ def transfers(v):
comments = comments.offset(25 * (page - 1)).limit(26).all() comments = comments.offset(25 * (page - 1)).limit(26).all()
next_exists = len(comments) > 25 next_exists = len(comments) > 25
comments = comments[:25] comments = comments[:25]
return render_template("transfers.html", v=v, page=page, comments=comments, standalone=True, next_exists=next_exists) return render_template("transfers.html", v=v, page=page, comments=comments, standalone=True, next_exists=next_exists)

View file

@ -126,4 +126,4 @@ def remove_report_comment(v, cid, uid):
g.db.commit() g.db.commit()
return {"message": "Report removed successfully!"} return {"message": "Report removed successfully!"}

View file

@ -287,4 +287,4 @@ def searchusers(v):
users=users[:25] users=users[:25]
if request.headers.get("Authorization"): return {"data": [x.json for x in users]} if request.headers.get("Authorization"): return {"data": [x.json for x in users]}
return render_template("search_users.html", v=v, query=query, total=total, page=page, users=users, sort=sort, t=t, next_exists=next_exists) return render_template("search_users.html", v=v, query=query, total=total, page=page, users=users, sort=sort, t=t, next_exists=next_exists)

View file

@ -877,4 +877,4 @@ def settings(v):
def settings_profile(v): def settings_profile(v):
if v.flairchanged: ti = datetime.utcfromtimestamp(v.flairchanged).strftime('%Y-%m-%d %H:%M:%S') if v.flairchanged: ti = datetime.utcfromtimestamp(v.flairchanged).strftime('%Y-%m-%d %H:%M:%S')
else: ti = '' else: ti = ''
return render_template("settings_profile.html", v=v, ti=ti) return render_template("settings_profile.html", v=v, ti=ti)

View file

@ -399,4 +399,4 @@ def sub_sidebar(v, sub):
@auth_desired @auth_desired
def subs(v): def subs(v):
subs = g.db.query(Sub, func.count(Submission.sub)).outerjoin(Submission, Sub.name == Submission.sub).group_by(Sub.name).order_by(func.count(Submission.sub).desc()).all() subs = g.db.query(Sub, func.count(Submission.sub)).outerjoin(Submission, Sub.name == Submission.sub).group_by(Sub.name).order_by(func.count(Submission.sub).desc()).all()
return render_template('sub/subs.html', v=v, subs=subs) return render_template('sub/subs.html', v=v, subs=subs)

View file

@ -1190,4 +1190,4 @@ def fp(v, fp):
print(v.username + ' + ' + u.username) print(v.username + ' + ' + u.username)
g.db.add(v) g.db.add(v)
g.db.commit() g.db.commit()
return '', 204 return '', 204

View file

@ -275,4 +275,4 @@ def api_vote_choice(comment_id, v):
comment.upvotes = g.db.query(CommentVote.comment_id).filter_by(comment_id=comment.id, vote_type=1).count() comment.upvotes = g.db.query(CommentVote.comment_id).filter_by(comment_id=comment.id, vote_type=1).count()
g.db.add(comment) g.db.add(comment)
g.db.commit() g.db.commit()
return "", 204 return "", 204

View file

@ -81,4 +81,4 @@
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');">PURGE CACHE</button> <button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');">PURGE CACHE</button>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -85,4 +85,4 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -69,4 +69,4 @@
{% endblock %} {% endblock %}

View file

@ -69,4 +69,4 @@
{% endblock %} {% endblock %}

View file

@ -64,4 +64,4 @@
<pre></pre> <pre></pre>
<div><a class="btn btn-danger" role="button" onclick="post_toast(this,'/admin/monthly')">Grant Monthly Marseybux</a></div> <div><a class="btn btn-danger" role="button" onclick="post_toast(this,'/admin/monthly')">Grant Monthly Marseybux</a></div>
{% endblock %} {% endblock %}

View file

@ -34,4 +34,4 @@
<input autocomplete="off" id="ban-submit" type="submit" class="btn btn-primary" value="Toggle ban" disabled> <input autocomplete="off" id="ban-submit" type="submit" class="btn btn-primary" value="Toggle ban" disabled>
</form> </form>
{% endblock %} {% endblock %}

Some files were not shown because too many files have changed in this diff Show more