SFP icon indicating copy to clipboard operation
SFP copied to clipboard

JavaScript: Feature to open links with native browser

Open Ran-Mewo opened this issue 2 years ago • 2 comments

Could it be possible to add in a custom JavaScript function (I am not sure if there's already a way to do this regularly) that, instead of opening links within Steam, it'll open links directly within the native browser?

I am creating a custom script that adds niche buttons to find specific mods for the game on NexusMods, GameBanana, or any website, except that it opens those links with the built-in browser of Steam. The CEF on Steam isn't quite well equipped like most browsers are, and it especially doesn't like when a webpage requests a custom protocol or uses newer JavaScript and HTML5 features.

Ran-Mewo avatar Oct 27 '23 10:10 Ran-Mewo

If you go to http://localhost:8080/json/version in your browser you will see that Steam uses Chrome 85 (and I mean, CEF even so it's probably more restricted than the normal Chrome 85 browser).

I do hope they update it at some point.

Anyway doing such a thing as you're requesting would definitely be possible from SFP's perspective, though I'm not amazing with javascript myself so yeah I'm not sure if there is a built-in way to do so without any changes from SFP's side.

PhantomGamers avatar Oct 27 '23 18:10 PhantomGamers

There is no way in JS to open another app. Unless that app has a handle like Nexus for the vortex manager.

Bread-Ch4n avatar Feb 24 '24 13:02 Bread-Ch4n