mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 02:21:17 +02:00
Add USE_SERVICE_WORKER setting (#9110)
* Add USE_SERVICE_WORKER setting This will be very useful setting for anyone doing frontend work. Fixes: https://github.com/go-gitea/gitea/issues/9044 * prevent potential syntax error on old browsers
This commit is contained in:
1 parent
cbaa1de9ec
commit
f0aaffeedc
6 files changed
+35
-17
No files matched your search
@@ -148,6 +148,9 @@ func NewFuncMap() []template.FuncMap {
|
||||
"MetaKeywords": func() string {
|
||||
return setting.UI.Meta.Keywords
|
||||
},
|
||||
"UseServiceWorker": func() bool {
|
||||
return setting.UI.UseServiceWorker
|
||||
},
|
||||
"FilenameIsImage": func(filename string) bool {
|
||||
mimeType := mime.TypeByExtension(filepath.Ext(filename))
|
||||
return strings.HasPrefix(mimeType, "image/")
|
||||
|
||||
Reference in new issue
Block a user