Fix sharing menu conflicts with extensions (#9074)
Detect only the share menu that belongs directly to the share dropdown.
An extension can add an unrelated nested `.dropdown-menu`. The previous descendant selector then skipped share-menu creation, leaving share URL placeholders unreplaced.
Fixes #7820.
Co-authored-by: Gerard Alvear <gerard.alvear@logiqd.me>