File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ,
You can’t perform that action at this time.
0 commit comments