Merge branch 'master' into mistletoe
This commit is contained in:
commit
4c1a5141ee
6 changed files with 2 additions and 43 deletions
Binary file not shown.
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 150 KiB |
|
@ -32,37 +32,6 @@ function popovertrigger() {
|
||||||
|
|
||||||
popovertrigger()
|
popovertrigger()
|
||||||
|
|
||||||
function eventasdf(value){
|
|
||||||
var content_id = value.getAttributeNode("data-content-id").value;
|
|
||||||
value.addEventListener("click", function(){jhkj(content_id)});
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkIfBussy(){
|
|
||||||
if (document.getElementById("bussy") != null){
|
|
||||||
document.body.removeChild(document.getElementById("bussy"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function dfgh(e){
|
|
||||||
active = document.activeElement;
|
|
||||||
if (active.getAttributeNode("class") == null || active.getAttributeNode("class").nodeValue != "user-name text-decoration-none"){
|
|
||||||
checkIfBussy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function jhkj(value){
|
|
||||||
checkIfBussy();
|
|
||||||
var popover_shit = document.getElementsByClassName("popover")[0];
|
|
||||||
var uiop = document.createElement("DIV");
|
|
||||||
|
|
||||||
uiop.innerHTML = popover_shit.outerHTML;
|
|
||||||
uiop.id = "bussy";
|
|
||||||
|
|
||||||
document.body.appendChild(uiop);
|
|
||||||
document.body.removeChild(popover_shit);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var usernames = document.querySelectorAll("a.user-name");
|
var usernames = document.querySelectorAll("a.user-name");
|
||||||
usernames.forEach(eventasdf);
|
usernames.forEach(eventasdf);
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -255,8 +255,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
||||||
elif sort == "comments":
|
elif sort == "comments":
|
||||||
posts = posts.order_by(Submission.comment_count.desc())
|
posts = posts.order_by(Submission.comment_count.desc())
|
||||||
|
|
||||||
if v:
|
if v: size = v.frontsize or 0
|
||||||
size = v.frontsize
|
|
||||||
else: size = 25
|
else: size = 25
|
||||||
|
|
||||||
posts = posts.offset(size * (page - 1)).limit(size+1).all()
|
posts = posts.offset(size * (page - 1)).limit(size+1).all()
|
||||||
|
|
|
@ -848,8 +848,6 @@ def settings_profilecss(v):
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def settings_block_user(v):
|
def settings_block_user(v):
|
||||||
|
|
||||||
if v and v.admin_level: return {"error": "Admins can't block users."}, 403
|
|
||||||
|
|
||||||
user = get_user(request.values.get("username"), graceful=True)
|
user = get_user(request.values.get("username"), graceful=True)
|
||||||
|
|
||||||
if not user: return {"error": "That user doesn't exist."}, 404
|
if not user: return {"error": "That user doesn't exist."}, 404
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue