Skip to content
Discussion options

You must be logged in to vote

Try this

glide.keymaps.set('normal', 'F', async () => {
    const tabs = await browser.tabs.query({ active: true, currentWindow: true });
    const currTabIdx = tabs[0]?.index;

    const nextTabIndex = currTabIdx != undefined ? currTabIdx + 1 : undefined;

    glide.hints.show({
        selector: '[href]',
        async action({ content }) {
            const href = await content.execute((target) => (target as HTMLAnchorElement).href);
            await browser.tabs.create({
                url: href,
                active: true,
                index: nextTabIndex,
            });
        },
    });
});

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@imnotpoz
Comment options

@RobertCraigie
Comment options

@suveshmoza
Comment options

Comment options

You must be logged in to vote
4 replies
@imnotpoz
Comment options

@imnotpoz
Comment options

@suveshmoza
Comment options

Answer selected by imnotpoz
@imnotpoz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted For discussions that have been turned into an issue.
3 participants