Use the configuration for popup dimensions

This commit is contained in:
Justin Hawkins 2021-09-30 17:45:25 +09:30
parent f4336f7114
commit 43baca27ab

View File

@ -102,7 +102,7 @@ func VersionHandler(w http.ResponseWriter, r *http.Request) {
func HomeHandler(w http.ResponseWriter, r *http.Request) { func HomeHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
bookmarkletURL := fmt.Sprintf("javascript:(function(f,s,n,o){window.open(f+encodeURIComponent(s),n,o)}('%s/fetch?url=',window.location,'yourform','width=500,height=500'));", conf.Server.Address) bookmarkletURL := fmt.Sprintf("javascript:(function(f,s,n,o){window.open(f+encodeURIComponent(s),n,o)}('%s/fetch?url=',window.location,'yourform','width=%d,height=%d'));", conf.Server.Address, conf.UI.PopupWidth, conf.UI.PopupHeight)
t, err := template.ParseFS(webFS, "web/layout.tmpl", "web/index.html") t, err := template.ParseFS(webFS, "web/layout.tmpl", "web/index.html")
if err != nil { if err != nil {