diff --git a/src/app.go b/src/app.go index d450b9a..a47e2e4 100644 --- a/src/app.go +++ b/src/app.go @@ -15,9 +15,10 @@ const ( Version = "0.15.0" // Links - WebsiteURL = "https://switchyard.aly.codes/" - IssueURL = "https://github.com/alyraffauf/switchyard/issues" - DonateURL = "https://ko-fi.com/alyraffauf" + WebsiteURL = "https://switchyard.aly.codes/" + IssueURL = "https://github.com/alyraffauf/switchyard/issues" + DonateURL = "https://ko-fi.com/alyraffauf" + FirefoxExtensionURL = "https://addons.mozilla.org/firefox/addon/switchyard/" ) type Contributor struct { diff --git a/src/settings_advanced.go b/src/settings_advanced.go index ba6eaa3..a60c0f1 100644 --- a/src/settings_advanced.go +++ b/src/settings_advanced.go @@ -106,5 +106,21 @@ func createAdvancedPage(win *adw.Window, cfg *Config) gtk.Widgetter { content.Append(configGroup) + extensionGroup := adw.NewPreferencesGroup() + extensionGroup.SetTitle("Browser Extension") + + extensionRow := adw.NewActionRow() + extensionRow.SetTitle("Firefox Extension") + extensionRow.SetSubtitle("Open links in Switchyard directly from Firefox") + extensionRow.SetActivatable(true) + extensionRow.AddSuffix(gtk.NewImageFromIconName("adw-external-link-symbolic")) + extensionRow.ConnectActivated(func() { + launcher := gtk.NewURILauncher(FirefoxExtensionURL) + launcher.Launch(context.Background(), &win.Window, nil) + }) + extensionGroup.Add(extensionRow) + + content.Append(extensionGroup) + return toolbarView }