Skip to content

Commit 7fd208f

Browse files
committed
fix: failure to add config button
1 parent 36e9aa5 commit 7fd208f

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/EGO Forum Enhancement.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name EdgeGamers Forum Enhancement%RELEASE_TYPE%
33
// @namespace https://github.com/blankdvth/eGOScripts/blob/master/src/EGO%20Forum%20Enhancement.ts
4-
// @version 4.11.5
4+
// @version 4.11.6
55
// @description Add various enhancements & QOL additions to the EdgeGamers Forums that are beneficial for Leadership members.
66
// @author blank_dvth, Skle, MSWS, PixeL
77
// @match https://www.edgegamers.com/*
@@ -630,12 +630,13 @@ function setupForumsConfig() {
630630

631631
const profileMenu = document.querySelector("div.js-visitorMenuBody");
632632
if (profileMenu) {
633-
const profileMenuObserver = new MutationObserver((mutations) => {
634-
mutations.every((mutation) => {
635-
mutation.addedNodes.forEach((node) => {
636-
handleProfileDropdown(node as HTMLElement);
637-
});
638-
});
633+
const profileMenuObserver = new MutationObserver(() => {
634+
// Manually performing querySelector here due to odd failure to identify added node by MutationObserver
635+
const target = profileMenu.querySelector("ul.tabPanes");
636+
if (target) {
637+
handleProfileDropdown(target as HTMLElement);
638+
profileMenuObserver.disconnect();
639+
}
639640
});
640641
profileMenuObserver.observe(profileMenu, {
641642
childList: true,

0 commit comments

Comments
 (0)