Skip to content

Commit

Permalink
Execute callback at initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
MxtOUT committed May 30, 2024
1 parent 5140da5 commit 1225d41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default class FFriendsSort extends Feature<CFriendsAndGroups> {

apply(): void | Promise<void> {
document.addEventListener("as_subpageNav", () => this.callback());
this.callback();
}

private async callback(): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default class FGroupsManageButton extends Feature<CFriendsAndGroups> {
override apply(): void {
DOMHelper.insertScript("scriptlets/Community/FriendsAndGroups/groupsManager.js");
document.addEventListener("as_subpageNav", () => this.callback());
this.callback();
}

callback() {
Expand Down

0 comments on commit 1225d41

Please sign in to comment.