mirror of
https://github.com/owncast/owncast.git
synced 2025-11-03 13:01:46 +08:00
Allow adding custom javascript to the page. Closes #2604
This commit is contained in:
13
controllers/customJavascript.go
Normal file
13
controllers/customJavascript.go
Normal 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))
|
||||
}
|
||||
Reference in New Issue
Block a user