Skip to content

Instantly share code, notes, and snippets.

View jdgower's full-sized avatar

Jeremy Gower jdgower

View GitHub Profile
(() => {
const host = () => document.querySelector('uidotsh-picker');
const btn = dir => host()?.shadowRoot?.querySelector(`button[data-nav][data-${dir}]`);
const cycle = dir => {
const b = btn(dir);
if (!b) return;
b.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, composed: true }));
};
window.uiNext = () => cycle('next');