summaryrefslogtreecommitdiff
path: root/source/github-helpers/load-details-menu.ts
diff options
context:
space:
mode:
Diffstat (limited to 'source/github-helpers/load-details-menu.ts')
-rw-r--r--source/github-helpers/load-details-menu.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/github-helpers/load-details-menu.ts b/source/github-helpers/load-details-menu.ts
new file mode 100644
index 00000000..94e3dd90
--- /dev/null
+++ b/source/github-helpers/load-details-menu.ts
@@ -0,0 +1,12 @@
+import select from 'select-dom';
+import oneEvent from 'one-event';
+
+export default async function loadDetailsMenu(detailsMenu: HTMLElement): Promise<void> {
+ const fragment = select('include-fragment.SelectMenu-loading', detailsMenu);
+ if (!fragment) {
+ return;
+ }
+
+ detailsMenu.parentElement!.dispatchEvent(new Event('mouseover'));
+ await oneEvent(fragment, 'load');
+}