Allow adding custom javascript to the page. Closes #2604

This commit is contained in:
Gabe Kangas
2023-01-18 22:38:24 -08:00
parent 053a33ac47
commit 19c228eaf6
15 changed files with 211 additions and 6 deletions

View File

@ -0,0 +1,13 @@
package controllers
import (
"net/http"
"github.com/owncast/owncast/core/data"
)
// ServeCustomJavascript will serve optional custom Javascript.
func ServeCustomJavascript(w http.ResponseWriter, r *http.Request) {
js := data.GetCustomJavascript()
w.Write([]byte(js))
}