Skip to content

Commit

Permalink
open new tabs with each validURL
Browse files Browse the repository at this point in the history
  • Loading branch information
farhadmak committed Oct 5, 2018
1 parent 5aecb1b commit c32aea0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion interfacer/src/browsh/comms.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,15 @@ func webSocketServer(w http.ResponseWriter, r *http.Request) {
}
// For some reason, using Firefox's CLI arg `--url https://google.com` doesn't consistently
// work. So we do it here instead.
sendMessageToWebExtension("/new_tab," + viper.GetString("startup-url"))
validURL := viper.GetStringSlice("validURL")
if len(validURL) == 0 {
sendMessageToWebExtension("/new_tab," + viper.GetString("startup-url"))
} else {
for i := 0; i < len(validURL); i++ {
sendMessageToWebExtension("/new_tab," + validURL[i])
}
}

}

func sendConfigToWebExtension() {
Expand Down

0 comments on commit c32aea0

Please sign in to comment.