Closed sonnyp closed 2 years ago
Feedback and comments welcome.
This is a WIP to implement custom rules and user script.
The userscript runs in strict mode and in the same process as the rest of the application
import
export
Here is an example
~/.config/Junction/userscript.js
~/.var/app/re.sonny.Junction/config/Junction/userscript.js
// resource is an object containing // `URI` https://docs.gtk.org/glib/struct.Uri.html // `content_type` String // `file` https://docs.gtk.org/gio/iface.File.html // Always open `*github.com*` URLs with Firefox Developer Edition if (resource.URI.get_host() === "github.com") { return { app: "firefox-developer-edition.desktop", }; } // Open Jitsi and 8x8 URLs in the desktop app if ( resource.URI.get_host() === "meet.jit.si" || resource.URI.get_host() === "8x8.vc" ) { return { app: "org.jitsi.jitsi-meet.desktop", // https://github.com/jitsi/jitsi-meet-electron/issues/509 uri: `jitsi-meet://${resource.file.get_uri()}`, }; } // Open Youtube URLs in FreeTube if (resource.URI.get_host() === "www.youtube.com") { return { app: "io.freetubeapp.FreeTube.desktop", }; }
I'm gonna close this for now due to a lack of interest from users (and myself);
There 2 main cases are already covered by
Feedback and comments welcome.
This is a WIP to implement custom rules and user script.
The userscript runs in strict mode and in the same process as the rest of the application
import
/export
for nowHere is an example
~/.config/Junction/userscript.js
~/.var/app/re.sonny.Junction/config/Junction/userscript.js