mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-25 16:23:30 +01:00
feat(ActionExtension): Use same Regex for Username matching as in App
This commit is contained in:
parent
1121cdd80b
commit
fde4c14b49
@ -30,7 +30,7 @@ Action.prototype = {
|
||||
};
|
||||
|
||||
function detectUsername() {
|
||||
var uriUsername = document.documentURI.match("@(.+)@([a-z0-9]+\.[a-z0-9]+)")
|
||||
var uriUsername = document.documentURI.match("(?:@([a-zA-Z0-9_]+)(@[a-zA-Z0-9_.-]+)?|#([^\\s.]+))")
|
||||
|
||||
if (Array.isArray(uriUsername)) {
|
||||
return uriUsername[0]
|
||||
|
Loading…
Reference in New Issue
Block a user