mirror of
https://github.com/ItsVipra/ProToots
synced 2024-11-10 14:14:19 +00:00
use closest() for type assignment
This commit is contained in:
parent
ebef128de4
commit
e1a700ace2
1 changed files with 4 additions and 4 deletions
|
@ -46,15 +46,15 @@ export function addTypeAttribute(ActionElement) {
|
|||
ActionElement.setAttribute("protoots-type", "detailed-status");
|
||||
} else if (hasClasses(ActionElement, "conversation")) {
|
||||
ActionElement.setAttribute("protoots-type", "conversation");
|
||||
ActionElement.parentElement?.parentElement?.setAttribute("protoots-type", "conversation");
|
||||
ActionElement.closest("article").setAttribute("protoots-type", "conversation");
|
||||
} else if (hasClasses(ActionElement, "account-authorize")) {
|
||||
ActionElement.setAttribute("protoots-type", "account-authorize");
|
||||
ActionElement.parentElement?.parentElement?.setAttribute("protoots-type", "account-authorize");
|
||||
ActionElement.closest("article").setAttribute("protoots-type", "account-authorize");
|
||||
} else if (hasClasses(ActionElement, "notification")) {
|
||||
ActionElement.setAttribute("protoots-type", "notification");
|
||||
ActionElement.parentElement?.parentElement?.setAttribute("protoots-type", "notification");
|
||||
ActionElement.closest("article").setAttribute("protoots-type", "notification");
|
||||
} else if (hasClasses(ActionElement, "account")) {
|
||||
ActionElement.setAttribute("protoots-type", "account");
|
||||
ActionElement.parentElement?.setAttribute("protoots-type", "account");
|
||||
ActionElement.closest("article").setAttribute("protoots-type", "account");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue