Skip to content

Conversation

@codingnninja
Copy link
Contributor

What is this pull request all about?

Enable Godmode to open URLs in users' default browsers. Check issue: #149.

Why is the pull request important?

Instead of overriding the electron window every time a link is clicked, Godmode can now open one or multiple links in users' default browsers.

How is it achieved?

I enabled Godmode to open any link in the users' default browsers by adding an app listener to the contents of Godmode.

Demonstration (Gif)

Image description

@codingnninja codingnninja changed the title Issue 149 URLs should open in system browser Aug 25, 2023
Comment on lines +203 to +208
contents.setWindowOpenHandler(({ url }) => {
setImmediate(() => {
shell.openExternal(url);
})
return {action: 'deny'};
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm a little concerned about how this will act for SSO signin, but will just try this anyway! thanks for PR!

@swyxio swyxio merged commit 8e3172a into smol-ai:main Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants