code cleanup

This commit is contained in:
Hugh Rundle 2021-11-29 19:45:52 +11:00
parent f5d9a204eb
commit 9a3ec4362b
No known key found for this signature in database
GPG key ID: CD23D6039184286B
2 changed files with 7 additions and 8 deletions

View file

@ -376,12 +376,11 @@ let BookWyrm = new class {
* @param {string} windowName windowName * @param {string} windowName windowName
* @return {undefined} * @return {undefined}
*/ */
displayPopUp(url, windowName){ displayPopUp(url, windowName) {
window.open(
window.open( url,
url, windowName,
windowName, "left=100,top=100,width=430,height=600"
"left=100,top=100,width=430,height=600" );
)
} }
}(); }();

View file

@ -100,7 +100,7 @@ def ostatus_follow_request(request):
"""prepare an outgoing remote follow request""" """prepare an outgoing remote follow request"""
uri = urllib.parse.unquote(request.GET.get("acct")) uri = urllib.parse.unquote(request.GET.get("acct"))
username_parts = re.search( username_parts = re.search(
"(?:^http(?:s?):\/\/)([\w\-\.]*)(?:.)*(?:(?:\/)([\w]*))", uri r"(?:^http(?:s?):\/\/)([\w\-\.]*)(?:.)*(?:(?:\/)([\w]*))", uri
) )
account = f"{username_parts[2]}@{username_parts[1]}" account = f"{username_parts[2]}@{username_parts[1]}"
user = handle_remote_webfinger(account) user = handle_remote_webfinger(account)