From 06ac565e76e8eab31ad7251270ae7e8f8224f350 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Sat, 22 May 2021 23:05:14 +0500 Subject: [PATCH] Let wiki admins specify custom script URLs in the config file See devconfig.ini for an example. --- assets/devconfig.ini | 5 + cfg/config.go | 23 +++ views/mutators.qtpl | 10 ++ views/mutators.qtpl.go | 296 +++++++++++++++++++------------- views/readers.qtpl | 9 + views/readers.qtpl.go | 376 ++++++++++++++++++++++++----------------- views/stuff.qtpl | 7 + views/stuff.qtpl.go | 346 +++++++++++++++++++++---------------- 8 files changed, 652 insertions(+), 420 deletions(-) diff --git a/assets/devconfig.ini b/assets/devconfig.ini index 4a26789..8321181 100644 --- a/assets/devconfig.ini +++ b/assets/devconfig.ini @@ -17,3 +17,8 @@ FixedAuthCredentialsPath = mycocredentials.json UseRegistration = true RegistrationCredentialsPath = mycoregistration.json LimitRegistration = 3 + +[CustomScripts] +OmnipresentScripts = https://lesarbr.es/do-the-roll.js +ViewScripts = https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-core.min.js,https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/autoloader/prism-autoloader.min.js +EditScripts = https://example.org \ No newline at end of file diff --git a/cfg/config.go b/cfg/config.go index e1671be..3b86425 100644 --- a/cfg/config.go +++ b/cfg/config.go @@ -29,6 +29,10 @@ var ( UseRegistration bool RegistrationCredentialsPath string LimitRegistration int + + OmnipresentScripts []string + ViewScripts []string + EditScripts []string ) // These variables are set before reading the config file, they are set in main.parseCliArgs. @@ -46,6 +50,7 @@ type Config struct { Hyphae Network Authorization + CustomScripts } // Hyphae is a section of Config which has fields related to special hyphae. @@ -62,6 +67,16 @@ type Network struct { GeminiCertificatePath string } +// CustomScripts is a section with paths to JavaScript files that are loaded on specified pages. +type CustomScripts struct { + // OmnipresentScripts: everywhere... + OmnipresentScripts []string `delim:","` + // ViewScripts: /hypha, /rev + ViewScripts []string `delim:","` + // Edit: /edit + EditScripts []string `delim:","` +} + // Authorization is a section of Config that has fields related to authorization and authentication. type Authorization struct { UseFixedAuth bool @@ -97,6 +112,11 @@ func ReadConfigFile() { RegistrationCredentialsPath: "", LimitRegistration: 0, }, + CustomScripts: CustomScripts{ + OmnipresentScripts: []string{}, + ViewScripts: []string{}, + EditScripts: []string{}, + }, } if ConfigFilePath != "" { @@ -126,6 +146,9 @@ func ReadConfigFile() { UseRegistration = cfg.UseRegistration RegistrationCredentialsPath = cfg.RegistrationCredentialsPath LimitRegistration = int(cfg.LimitRegistration) + OmnipresentScripts = cfg.OmnipresentScripts + ViewScripts = cfg.ViewScripts + EditScripts = cfg.EditScripts // This URL makes much more sense. if URL == "" { diff --git a/views/mutators.qtpl b/views/mutators.qtpl index 36a7fed..c1d5182 100644 --- a/views/mutators.qtpl +++ b/views/mutators.qtpl @@ -1,4 +1,6 @@ {% import "net/http" %} + +{% import "github.com/bouncepaw/mycorrhiza/cfg" %} {% import "github.com/bouncepaw/mycorrhiza/util" %} {% import "github.com/bouncepaw/mycorrhiza/user" %} @@ -83,6 +85,7 @@ {%s= Toolbar(user.FromRequest(rq)) %} +{%= editScripts() %} {% endfunc %} {% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) %} @@ -104,4 +107,11 @@ {%s= Toolbar(user.FromRequest(rq)) %} +{%= editScripts() %} {% endfunc %} + +{% func editScripts() %} +{% for _, scriptPath := range cfg.EditScripts %} + +{% endfor %} +{% endfunc %} \ No newline at end of file diff --git a/views/mutators.qtpl.go b/views/mutators.qtpl.go index 0629b0c..035dbc8 100644 --- a/views/mutators.qtpl.go +++ b/views/mutators.qtpl.go @@ -7,34 +7,37 @@ package views //line views/mutators.qtpl:1 import "net/http" -//line views/mutators.qtpl:2 +//line views/mutators.qtpl:3 +import "github.com/bouncepaw/mycorrhiza/cfg" + +//line views/mutators.qtpl:4 import "github.com/bouncepaw/mycorrhiza/util" -//line views/mutators.qtpl:3 +//line views/mutators.qtpl:5 import "github.com/bouncepaw/mycorrhiza/user" -//line views/mutators.qtpl:5 +//line views/mutators.qtpl:7 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line views/mutators.qtpl:5 +//line views/mutators.qtpl:7 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line views/mutators.qtpl:5 +//line views/mutators.qtpl:7 func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) { -//line views/mutators.qtpl:5 +//line views/mutators.qtpl:7 qw422016.N().S(` `) -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 } -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 func WriteToolbar(qq422016 qtio422016.Writer, u *user.User) { -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 StreamToolbar(qw422016, u) -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 qt422016.ReleaseWriter(qw422016) -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 } -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 func Toolbar(u *user.User) string { -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 qb422016 := qt422016.AcquireByteBuffer() -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 WriteToolbar(qb422016, u) -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 qs422016 := string(qb422016.B) -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 qt422016.ReleaseByteBuffer(qb422016) -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 return qs422016 -//line views/mutators.qtpl:67 +//line views/mutators.qtpl:69 } -//line views/mutators.qtpl:69 +//line views/mutators.qtpl:71 func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { -//line views/mutators.qtpl:69 +//line views/mutators.qtpl:71 qw422016.N().S(` `) -//line views/mutators.qtpl:70 +//line views/mutators.qtpl:72 qw422016.N().S(NavHTML(rq, hyphaName, "edit")) -//line views/mutators.qtpl:70 +//line views/mutators.qtpl:72 qw422016.N().S(`

Edit `) -//line views/mutators.qtpl:73 +//line views/mutators.qtpl:75 qw422016.E().S(util.BeautifulName(hyphaName)) -//line views/mutators.qtpl:73 +//line views/mutators.qtpl:75 qw422016.N().S(`

`) -//line views/mutators.qtpl:74 +//line views/mutators.qtpl:76 qw422016.N().S(warning) -//line views/mutators.qtpl:74 +//line views/mutators.qtpl:76 qw422016.N().S(`

Cancel
`) -//line views/mutators.qtpl:84 +//line views/mutators.qtpl:86 qw422016.N().S(Toolbar(user.FromRequest(rq))) -//line views/mutators.qtpl:84 +//line views/mutators.qtpl:86 qw422016.N().S(`
`) -//line views/mutators.qtpl:86 -} - -//line views/mutators.qtpl:86 -func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { -//line views/mutators.qtpl:86 - qw422016 := qt422016.AcquireWriter(qq422016) -//line views/mutators.qtpl:86 - StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning) -//line views/mutators.qtpl:86 - qt422016.ReleaseWriter(qw422016) -//line views/mutators.qtpl:86 -} - -//line views/mutators.qtpl:86 -func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string { -//line views/mutators.qtpl:86 - qb422016 := qt422016.AcquireByteBuffer() -//line views/mutators.qtpl:86 - WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning) -//line views/mutators.qtpl:86 - qs422016 := string(qb422016.B) -//line views/mutators.qtpl:86 - qt422016.ReleaseByteBuffer(qb422016) -//line views/mutators.qtpl:86 - return qs422016 -//line views/mutators.qtpl:86 -} - //line views/mutators.qtpl:88 -func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) { + streameditScripts(qw422016) //line views/mutators.qtpl:88 qw422016.N().S(` `) //line views/mutators.qtpl:89 - qw422016.N().S(NavHTML(rq, hyphaName, "edit")) +} + //line views/mutators.qtpl:89 +func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { +//line views/mutators.qtpl:89 + qw422016 := qt422016.AcquireWriter(qq422016) +//line views/mutators.qtpl:89 + StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning) +//line views/mutators.qtpl:89 + qt422016.ReleaseWriter(qw422016) +//line views/mutators.qtpl:89 +} + +//line views/mutators.qtpl:89 +func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string { +//line views/mutators.qtpl:89 + qb422016 := qt422016.AcquireByteBuffer() +//line views/mutators.qtpl:89 + WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning) +//line views/mutators.qtpl:89 + qs422016 := string(qb422016.B) +//line views/mutators.qtpl:89 + qt422016.ReleaseByteBuffer(qb422016) +//line views/mutators.qtpl:89 + return qs422016 +//line views/mutators.qtpl:89 +} + +//line views/mutators.qtpl:91 +func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) { +//line views/mutators.qtpl:91 + qw422016.N().S(` +`) +//line views/mutators.qtpl:92 + qw422016.N().S(NavHTML(rq, hyphaName, "edit")) +//line views/mutators.qtpl:92 qw422016.N().S(`

Edit `) -//line views/mutators.qtpl:92 +//line views/mutators.qtpl:95 qw422016.E().S(util.BeautifulName(hyphaName)) -//line views/mutators.qtpl:92 +//line views/mutators.qtpl:95 qw422016.N().S(` (preview)

`) -//line views/mutators.qtpl:93 +//line views/mutators.qtpl:96 qw422016.N().S(warning) -//line views/mutators.qtpl:93 +//line views/mutators.qtpl:96 qw422016.N().S(`

Cancel

Note that the hypha is not saved yet. You can preview the changes ↓

`) -//line views/mutators.qtpl:103 +//line views/mutators.qtpl:106 qw422016.N().S(renderedPage) -//line views/mutators.qtpl:103 +//line views/mutators.qtpl:106 qw422016.N().S(`
`) -//line views/mutators.qtpl:105 +//line views/mutators.qtpl:108 qw422016.N().S(Toolbar(user.FromRequest(rq))) -//line views/mutators.qtpl:105 +//line views/mutators.qtpl:108 qw422016.N().S(`
`) -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:110 + streameditScripts(qw422016) +//line views/mutators.qtpl:110 + qw422016.N().S(` +`) +//line views/mutators.qtpl:111 } -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) { -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, warning, renderedPage) -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 qt422016.ReleaseWriter(qw422016) -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 } -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) string { -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 qb422016 := qt422016.AcquireByteBuffer() -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, warning, renderedPage) -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 qs422016 := string(qb422016.B) -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 qt422016.ReleaseByteBuffer(qb422016) -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 return qs422016 -//line views/mutators.qtpl:107 +//line views/mutators.qtpl:111 +} + +//line views/mutators.qtpl:113 +func streameditScripts(qw422016 *qt422016.Writer) { +//line views/mutators.qtpl:113 + qw422016.N().S(` +`) +//line views/mutators.qtpl:114 + for _, scriptPath := range cfg.EditScripts { +//line views/mutators.qtpl:114 + qw422016.N().S(` + +`) +//line views/mutators.qtpl:116 + } +//line views/mutators.qtpl:116 + qw422016.N().S(` +`) +//line views/mutators.qtpl:117 +} + +//line views/mutators.qtpl:117 +func writeeditScripts(qq422016 qtio422016.Writer) { +//line views/mutators.qtpl:117 + qw422016 := qt422016.AcquireWriter(qq422016) +//line views/mutators.qtpl:117 + streameditScripts(qw422016) +//line views/mutators.qtpl:117 + qt422016.ReleaseWriter(qw422016) +//line views/mutators.qtpl:117 +} + +//line views/mutators.qtpl:117 +func editScripts() string { +//line views/mutators.qtpl:117 + qb422016 := qt422016.AcquireByteBuffer() +//line views/mutators.qtpl:117 + writeeditScripts(qb422016) +//line views/mutators.qtpl:117 + qs422016 := string(qb422016.B) +//line views/mutators.qtpl:117 + qt422016.ReleaseByteBuffer(qb422016) +//line views/mutators.qtpl:117 + return qs422016 +//line views/mutators.qtpl:117 } diff --git a/views/readers.qtpl b/views/readers.qtpl index 22c4ac8..34f861d 100644 --- a/views/readers.qtpl +++ b/views/readers.qtpl @@ -3,6 +3,7 @@ {% import "path" %} {% import "os" %} +{% import "github.com/bouncepaw/mycorrhiza/cfg" %} {% import "github.com/bouncepaw/mycorrhiza/hyphae" %} {% import "github.com/bouncepaw/mycorrhiza/mimetype" %} {% import "github.com/bouncepaw/mycorrhiza/tree" %} @@ -100,6 +101,7 @@ If `contents` == "", a helpful message is shown instead. {%= RelativeHyphaeHTML(relatives) %} +{%= viewScripts() %} {% endfunc %} {% func RevisionHTML(rq *http.Request, h *hyphae.Hypha, contents, revHash string) %} @@ -118,4 +120,11 @@ If `contents` == "", a helpful message is shown instead. {%= RelativeHyphaeHTML(relatives) %} +{%= viewScripts() %} {% endfunc %} + +{% func viewScripts() %} +{% for _, scriptPath := range cfg.ViewScripts %} + +{% endfor %} +{% endfunc %} \ No newline at end of file diff --git a/views/readers.qtpl.go b/views/readers.qtpl.go index bba5bba..10a98ed 100644 --- a/views/readers.qtpl.go +++ b/views/readers.qtpl.go @@ -17,139 +17,142 @@ import "path" import "os" //line views/readers.qtpl:6 -import "github.com/bouncepaw/mycorrhiza/hyphae" +import "github.com/bouncepaw/mycorrhiza/cfg" //line views/readers.qtpl:7 -import "github.com/bouncepaw/mycorrhiza/mimetype" +import "github.com/bouncepaw/mycorrhiza/hyphae" //line views/readers.qtpl:8 -import "github.com/bouncepaw/mycorrhiza/tree" +import "github.com/bouncepaw/mycorrhiza/mimetype" //line views/readers.qtpl:9 -import "github.com/bouncepaw/mycorrhiza/user" +import "github.com/bouncepaw/mycorrhiza/tree" //line views/readers.qtpl:10 +import "github.com/bouncepaw/mycorrhiza/user" + +//line views/readers.qtpl:11 import "github.com/bouncepaw/mycorrhiza/util" -//line views/readers.qtpl:12 +//line views/readers.qtpl:13 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line views/readers.qtpl:12 +//line views/readers.qtpl:13 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line views/readers.qtpl:12 +//line views/readers.qtpl:13 func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User) { -//line views/readers.qtpl:12 +//line views/readers.qtpl:13 qw422016.N().S(` `) -//line views/readers.qtpl:13 +//line views/readers.qtpl:14 StreamNavHTML(qw422016, rq, h.Name, "attachment") -//line views/readers.qtpl:13 +//line views/readers.qtpl:14 qw422016.N().S(`

Attachment of `) -//line views/readers.qtpl:16 +//line views/readers.qtpl:17 qw422016.E().S(util.BeautifulName(h.Name)) -//line views/readers.qtpl:16 +//line views/readers.qtpl:17 qw422016.N().S(`

`) -//line views/readers.qtpl:17 +//line views/readers.qtpl:18 if h.BinaryPath == "" { -//line views/readers.qtpl:17 +//line views/readers.qtpl:18 qw422016.N().S(`

This hypha has no attachment, you can upload it here.

`) -//line views/readers.qtpl:19 +//line views/readers.qtpl:20 } else { -//line views/readers.qtpl:19 +//line views/readers.qtpl:20 qw422016.N().S(`

You can manage the hypha's attachment on this page.

`) -//line views/readers.qtpl:21 +//line views/readers.qtpl:22 } -//line views/readers.qtpl:21 +//line views/readers.qtpl:22 qw422016.N().S(`
`) -//line views/readers.qtpl:25 +//line views/readers.qtpl:26 if h.BinaryPath != "" { -//line views/readers.qtpl:25 +//line views/readers.qtpl:26 qw422016.N().S(` `) -//line views/readers.qtpl:27 +//line views/readers.qtpl:28 mime := mimetype.FromExtension(path.Ext(h.BinaryPath)) fileinfo, err := os.Stat(h.BinaryPath) -//line views/readers.qtpl:28 +//line views/readers.qtpl:29 qw422016.N().S(` `) -//line views/readers.qtpl:29 +//line views/readers.qtpl:30 if err == nil { -//line views/readers.qtpl:29 +//line views/readers.qtpl:30 qw422016.N().S(`
Stat

MIME type: `) -//line views/readers.qtpl:33 +//line views/readers.qtpl:34 qw422016.E().S(mime) -//line views/readers.qtpl:33 +//line views/readers.qtpl:34 qw422016.N().S(`

`) -//line views/readers.qtpl:35 +//line views/readers.qtpl:36 } -//line views/readers.qtpl:35 +//line views/readers.qtpl:36 qw422016.N().S(` `) -//line views/readers.qtpl:37 +//line views/readers.qtpl:38 if strings.HasPrefix(mime, "image/") { -//line views/readers.qtpl:37 +//line views/readers.qtpl:38 qw422016.N().S(`
Include
img { `)
-//line views/readers.qtpl:41
+//line views/readers.qtpl:42
 			qw422016.E().S(h.Name)
-//line views/readers.qtpl:41
+//line views/readers.qtpl:42
 			qw422016.N().S(` }
`) -//line views/readers.qtpl:43 +//line views/readers.qtpl:44 } -//line views/readers.qtpl:43 +//line views/readers.qtpl:44 qw422016.N().S(` `) -//line views/readers.qtpl:44 +//line views/readers.qtpl:45 } -//line views/readers.qtpl:44 +//line views/readers.qtpl:45 qw422016.N().S(` `) -//line views/readers.qtpl:46 +//line views/readers.qtpl:47 if u.CanProceed("upload-binary") { -//line views/readers.qtpl:46 +//line views/readers.qtpl:47 qw422016.N().S(` `) -//line views/readers.qtpl:57 +//line views/readers.qtpl:58 } -//line views/readers.qtpl:57 +//line views/readers.qtpl:58 qw422016.N().S(` `) -//line views/readers.qtpl:59 +//line views/readers.qtpl:60 if h.BinaryPath != "" && u.CanProceed("unattach-confirm") { -//line views/readers.qtpl:59 +//line views/readers.qtpl:60 qw422016.N().S(` `) -//line views/readers.qtpl:67 +//line views/readers.qtpl:68 } -//line views/readers.qtpl:67 +//line views/readers.qtpl:68 qw422016.N().S(`
`) -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 } -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 func WriteAttachmentMenuHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User) { -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 StreamAttachmentMenuHTML(qw422016, rq, h, u) -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 qt422016.ReleaseWriter(qw422016) -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 } -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) string { -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 qb422016 := qt422016.AcquireByteBuffer() -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 WriteAttachmentMenuHTML(qb422016, rq, h, u) -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 qs422016 := string(qb422016.B) -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 qt422016.ReleaseByteBuffer(qb422016) -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 return qs422016 -//line views/readers.qtpl:72 +//line views/readers.qtpl:73 } // If `contents` == "", a helpful message is shown instead. -//line views/readers.qtpl:75 +//line views/readers.qtpl:76 func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) { -//line views/readers.qtpl:75 +//line views/readers.qtpl:76 qw422016.N().S(` `) -//line views/readers.qtpl:77 +//line views/readers.qtpl:78 relatives, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name) u := user.FromRequest(rq) -//line views/readers.qtpl:79 +//line views/readers.qtpl:80 qw422016.N().S(` `) -//line views/readers.qtpl:80 +//line views/readers.qtpl:81 StreamNavHTML(qw422016, rq, h.Name, "page") -//line views/readers.qtpl:80 +//line views/readers.qtpl:81 qw422016.N().S(`
`) -//line views/readers.qtpl:84 +//line views/readers.qtpl:85 qw422016.N().S(NaviTitleHTML(h)) -//line views/readers.qtpl:84 +//line views/readers.qtpl:85 qw422016.N().S(` `) -//line views/readers.qtpl:85 +//line views/readers.qtpl:86 if h.Exists { -//line views/readers.qtpl:85 +//line views/readers.qtpl:86 qw422016.N().S(` `) -//line views/readers.qtpl:86 +//line views/readers.qtpl:87 qw422016.N().S(contents) -//line views/readers.qtpl:86 +//line views/readers.qtpl:87 qw422016.N().S(` `) -//line views/readers.qtpl:87 +//line views/readers.qtpl:88 } else { -//line views/readers.qtpl:87 +//line views/readers.qtpl:88 qw422016.N().S(` `) -//line views/readers.qtpl:88 +//line views/readers.qtpl:89 streamnonExistentHyphaNotice(qw422016, h, u) -//line views/readers.qtpl:88 +//line views/readers.qtpl:89 qw422016.N().S(` `) -//line views/readers.qtpl:89 +//line views/readers.qtpl:90 } -//line views/readers.qtpl:89 +//line views/readers.qtpl:90 qw422016.N().S(`
`) -//line views/readers.qtpl:92 +//line views/readers.qtpl:93 if prevHyphaName != "" { -//line views/readers.qtpl:92 +//line views/readers.qtpl:93 qw422016.N().S(` `) -//line views/readers.qtpl:94 +//line views/readers.qtpl:95 } -//line views/readers.qtpl:94 +//line views/readers.qtpl:95 qw422016.N().S(` `) -//line views/readers.qtpl:95 +//line views/readers.qtpl:96 if nextHyphaName != "" { -//line views/readers.qtpl:95 +//line views/readers.qtpl:96 qw422016.N().S(` `) -//line views/readers.qtpl:97 +//line views/readers.qtpl:98 } -//line views/readers.qtpl:97 +//line views/readers.qtpl:98 qw422016.N().S(`
`) -//line views/readers.qtpl:99 +//line views/readers.qtpl:100 StreamSubhyphaeHTML(qw422016, subhyphae) -//line views/readers.qtpl:99 +//line views/readers.qtpl:100 qw422016.N().S(`
`) -//line views/readers.qtpl:101 +//line views/readers.qtpl:102 StreamRelativeHyphaeHTML(qw422016, relatives) -//line views/readers.qtpl:101 +//line views/readers.qtpl:102 qw422016.N().S(`
`) -//line views/readers.qtpl:103 -} - -//line views/readers.qtpl:103 -func WriteHyphaHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) { -//line views/readers.qtpl:103 - qw422016 := qt422016.AcquireWriter(qq422016) -//line views/readers.qtpl:103 - StreamHyphaHTML(qw422016, rq, h, contents) -//line views/readers.qtpl:103 - qt422016.ReleaseWriter(qw422016) -//line views/readers.qtpl:103 -} - -//line views/readers.qtpl:103 -func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) string { -//line views/readers.qtpl:103 - qb422016 := qt422016.AcquireByteBuffer() -//line views/readers.qtpl:103 - WriteHyphaHTML(qb422016, rq, h, contents) -//line views/readers.qtpl:103 - qs422016 := string(qb422016.B) -//line views/readers.qtpl:103 - qt422016.ReleaseByteBuffer(qb422016) -//line views/readers.qtpl:103 - return qs422016 -//line views/readers.qtpl:103 -} - -//line views/readers.qtpl:105 -func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) { -//line views/readers.qtpl:105 +//line views/readers.qtpl:104 + streamviewScripts(qw422016) +//line views/readers.qtpl:104 qw422016.N().S(` `) +//line views/readers.qtpl:105 +} + +//line views/readers.qtpl:105 +func WriteHyphaHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) { +//line views/readers.qtpl:105 + qw422016 := qt422016.AcquireWriter(qq422016) +//line views/readers.qtpl:105 + StreamHyphaHTML(qw422016, rq, h, contents) +//line views/readers.qtpl:105 + qt422016.ReleaseWriter(qw422016) +//line views/readers.qtpl:105 +} + +//line views/readers.qtpl:105 +func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) string { +//line views/readers.qtpl:105 + qb422016 := qt422016.AcquireByteBuffer() +//line views/readers.qtpl:105 + WriteHyphaHTML(qb422016, rq, h, contents) +//line views/readers.qtpl:105 + qs422016 := string(qb422016.B) +//line views/readers.qtpl:105 + qt422016.ReleaseByteBuffer(qb422016) +//line views/readers.qtpl:105 + return qs422016 +//line views/readers.qtpl:105 +} + //line views/readers.qtpl:107 +func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) { +//line views/readers.qtpl:107 + qw422016.N().S(` +`) +//line views/readers.qtpl:109 relatives, subhyphae, _, _ := tree.Tree(h.Name) -//line views/readers.qtpl:108 +//line views/readers.qtpl:110 qw422016.N().S(` `) -//line views/readers.qtpl:109 +//line views/readers.qtpl:111 StreamNavHTML(qw422016, rq, h.Name, "revision", revHash) -//line views/readers.qtpl:109 +//line views/readers.qtpl:111 qw422016.N().S(`

Please note that viewing binary parts of hyphae is not supported in history for now.

`) -//line views/readers.qtpl:114 +//line views/readers.qtpl:116 qw422016.N().S(NaviTitleHTML(h)) -//line views/readers.qtpl:114 +//line views/readers.qtpl:116 qw422016.N().S(` `) -//line views/readers.qtpl:115 +//line views/readers.qtpl:117 qw422016.N().S(contents) -//line views/readers.qtpl:115 +//line views/readers.qtpl:117 qw422016.N().S(`
`) -//line views/readers.qtpl:117 +//line views/readers.qtpl:119 StreamSubhyphaeHTML(qw422016, subhyphae) -//line views/readers.qtpl:117 +//line views/readers.qtpl:119 qw422016.N().S(`
`) -//line views/readers.qtpl:119 +//line views/readers.qtpl:121 StreamRelativeHyphaeHTML(qw422016, relatives) -//line views/readers.qtpl:119 +//line views/readers.qtpl:121 qw422016.N().S(`
`) -//line views/readers.qtpl:121 +//line views/readers.qtpl:123 + streamviewScripts(qw422016) +//line views/readers.qtpl:123 + qw422016.N().S(` +`) +//line views/readers.qtpl:124 } -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) { -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 StreamRevisionHTML(qw422016, rq, h, contents, revHash) -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 qt422016.ReleaseWriter(qw422016) -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 } -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 func RevisionHTML(rq *http.Request, h *hyphae.Hypha, contents, revHash string) string { -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 qb422016 := qt422016.AcquireByteBuffer() -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 WriteRevisionHTML(qb422016, rq, h, contents, revHash) -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 qs422016 := string(qb422016.B) -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 qt422016.ReleaseByteBuffer(qb422016) -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 return qs422016 -//line views/readers.qtpl:121 +//line views/readers.qtpl:124 +} + +//line views/readers.qtpl:126 +func streamviewScripts(qw422016 *qt422016.Writer) { +//line views/readers.qtpl:126 + qw422016.N().S(` +`) +//line views/readers.qtpl:127 + for _, scriptPath := range cfg.ViewScripts { +//line views/readers.qtpl:127 + qw422016.N().S(` + +`) +//line views/readers.qtpl:129 + } +//line views/readers.qtpl:129 + qw422016.N().S(` +`) +//line views/readers.qtpl:130 +} + +//line views/readers.qtpl:130 +func writeviewScripts(qq422016 qtio422016.Writer) { +//line views/readers.qtpl:130 + qw422016 := qt422016.AcquireWriter(qq422016) +//line views/readers.qtpl:130 + streamviewScripts(qw422016) +//line views/readers.qtpl:130 + qt422016.ReleaseWriter(qw422016) +//line views/readers.qtpl:130 +} + +//line views/readers.qtpl:130 +func viewScripts() string { +//line views/readers.qtpl:130 + qb422016 := qt422016.AcquireByteBuffer() +//line views/readers.qtpl:130 + writeviewScripts(qb422016) +//line views/readers.qtpl:130 + qs422016 := string(qb422016.B) +//line views/readers.qtpl:130 + qt422016.ReleaseByteBuffer(qb422016) +//line views/readers.qtpl:130 + return qs422016 +//line views/readers.qtpl:130 } diff --git a/views/stuff.qtpl b/views/stuff.qtpl index 21c2f8a..68d29a5 100644 --- a/views/stuff.qtpl +++ b/views/stuff.qtpl @@ -26,6 +26,7 @@ {%s= body %} + {%= omnipresentScripts() %} {% endfunc %} @@ -152,3 +153,9 @@ for u := range user.YieldUsers() { {% endfunc %} + +{% func omnipresentScripts() %} +{% for _, scriptPath := range cfg.OmnipresentScripts %} + +{% endfor %} +{% endfunc %} \ No newline at end of file diff --git a/views/stuff.qtpl.go b/views/stuff.qtpl.go index 9344f8e..5c96841 100644 --- a/views/stuff.qtpl.go +++ b/views/stuff.qtpl.go @@ -90,48 +90,53 @@ func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, u *user.User, //line views/stuff.qtpl:28 qw422016.N().S(body) //line views/stuff.qtpl:28 + qw422016.N().S(` + `) +//line views/stuff.qtpl:29 + streamomnipresentScripts(qw422016) +//line views/stuff.qtpl:29 qw422016.N().S(` `) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 } -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 func WriteBaseHTML(qq422016 qtio422016.Writer, title, body string, u *user.User, headElements ...string) { -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 StreamBaseHTML(qw422016, title, body, u, headElements...) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 } -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 func BaseHTML(title, body string, u *user.User, headElements ...string) string { -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 WriteBaseHTML(qb422016, title, body, u, headElements...) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 return qs422016 -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:32 } -//line views/stuff.qtpl:33 +//line views/stuff.qtpl:34 func StreamUserListHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:33 +//line views/stuff.qtpl:34 qw422016.N().S(`

List of users

`) -//line views/stuff.qtpl:38 +//line views/stuff.qtpl:39 var ( admins = make([]string, 0) moderators = make([]string, 0) @@ -148,303 +153,303 @@ func StreamUserListHTML(qw422016 *qt422016.Writer) { } } -//line views/stuff.qtpl:53 +//line views/stuff.qtpl:54 qw422016.N().S(`

Admins

    `) -//line views/stuff.qtpl:56 +//line views/stuff.qtpl:57 for _, name := range admins { -//line views/stuff.qtpl:56 +//line views/stuff.qtpl:57 qw422016.N().S(`
  1. `) -//line views/stuff.qtpl:57 +//line views/stuff.qtpl:58 qw422016.E().S(name) -//line views/stuff.qtpl:57 +//line views/stuff.qtpl:58 qw422016.N().S(`
  2. `) -//line views/stuff.qtpl:58 +//line views/stuff.qtpl:59 } -//line views/stuff.qtpl:58 +//line views/stuff.qtpl:59 qw422016.N().S(`

Moderators

    `) -//line views/stuff.qtpl:62 +//line views/stuff.qtpl:63 for _, name := range moderators { -//line views/stuff.qtpl:62 +//line views/stuff.qtpl:63 qw422016.N().S(`
  1. `) -//line views/stuff.qtpl:63 +//line views/stuff.qtpl:64 qw422016.E().S(name) -//line views/stuff.qtpl:63 +//line views/stuff.qtpl:64 qw422016.N().S(`
  2. `) -//line views/stuff.qtpl:64 +//line views/stuff.qtpl:65 } -//line views/stuff.qtpl:64 +//line views/stuff.qtpl:65 qw422016.N().S(`

Editors

    `) -//line views/stuff.qtpl:68 +//line views/stuff.qtpl:69 for _, name := range editors { -//line views/stuff.qtpl:68 +//line views/stuff.qtpl:69 qw422016.N().S(`
  1. `) -//line views/stuff.qtpl:69 +//line views/stuff.qtpl:70 qw422016.E().S(name) -//line views/stuff.qtpl:69 +//line views/stuff.qtpl:70 qw422016.N().S(`
  2. `) -//line views/stuff.qtpl:70 +//line views/stuff.qtpl:71 } -//line views/stuff.qtpl:70 +//line views/stuff.qtpl:71 qw422016.N().S(`
`) -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 } -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 func WriteUserListHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 StreamUserListHTML(qw422016) -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 } -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 func UserListHTML() string { -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 WriteUserListHTML(qb422016) -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 return qs422016 -//line views/stuff.qtpl:74 +//line views/stuff.qtpl:75 } -//line views/stuff.qtpl:76 +//line views/stuff.qtpl:77 func StreamHyphaListHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:76 +//line views/stuff.qtpl:77 qw422016.N().S(`

List of hyphae

This wiki has `) -//line views/stuff.qtpl:80 +//line views/stuff.qtpl:81 qw422016.N().D(hyphae.Count()) -//line views/stuff.qtpl:80 +//line views/stuff.qtpl:81 qw422016.N().S(` hyphae.

    `) -//line views/stuff.qtpl:82 +//line views/stuff.qtpl:83 for h := range hyphae.YieldExistingHyphae() { -//line views/stuff.qtpl:82 +//line views/stuff.qtpl:83 qw422016.N().S(`
  • `) -//line views/stuff.qtpl:84 +//line views/stuff.qtpl:85 qw422016.E().S(util.BeautifulName(h.Name)) -//line views/stuff.qtpl:84 +//line views/stuff.qtpl:85 qw422016.N().S(` `) -//line views/stuff.qtpl:85 +//line views/stuff.qtpl:86 if h.BinaryPath != "" { -//line views/stuff.qtpl:85 +//line views/stuff.qtpl:86 qw422016.N().S(` `) -//line views/stuff.qtpl:86 +//line views/stuff.qtpl:87 qw422016.E().S(filepath.Ext(h.BinaryPath)[1:]) -//line views/stuff.qtpl:86 +//line views/stuff.qtpl:87 qw422016.N().S(` `) -//line views/stuff.qtpl:87 +//line views/stuff.qtpl:88 } -//line views/stuff.qtpl:87 +//line views/stuff.qtpl:88 qw422016.N().S(`
  • `) -//line views/stuff.qtpl:89 +//line views/stuff.qtpl:90 } -//line views/stuff.qtpl:89 +//line views/stuff.qtpl:90 qw422016.N().S(`
`) -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 } -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 func WriteHyphaListHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 StreamHyphaListHTML(qw422016) -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 } -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 func HyphaListHTML() string { -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 WriteHyphaListHTML(qb422016) -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 return qs422016 -//line views/stuff.qtpl:93 +//line views/stuff.qtpl:94 } -//line views/stuff.qtpl:95 +//line views/stuff.qtpl:96 func StreamAboutHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:95 +//line views/stuff.qtpl:96 qw422016.N().S(`

About `) -//line views/stuff.qtpl:99 +//line views/stuff.qtpl:100 qw422016.E().S(cfg.WikiName) -//line views/stuff.qtpl:99 +//line views/stuff.qtpl:100 qw422016.N().S(`

See /list for information about hyphae on this wiki.

`) -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 } -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 func WriteAboutHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 StreamAboutHTML(qw422016) -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 } -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 func AboutHTML() string { -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 WriteAboutHTML(qb422016) -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 return qs422016 -//line views/stuff.qtpl:117 +//line views/stuff.qtpl:118 } -//line views/stuff.qtpl:119 +//line views/stuff.qtpl:120 func StreamAdminPanelHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:119 +//line views/stuff.qtpl:120 qw422016.N().S(`
@@ -481,31 +486,80 @@ func StreamAdminPanelHTML(qw422016 *qt422016.Writer) {
`) -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 } -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 func WriteAdminPanelHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 StreamAdminPanelHTML(qw422016) -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 } -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 func AdminPanelHTML() string { -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 WriteAdminPanelHTML(qb422016) -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 return qs422016 -//line views/stuff.qtpl:154 +//line views/stuff.qtpl:155 +} + +//line views/stuff.qtpl:157 +func streamomnipresentScripts(qw422016 *qt422016.Writer) { +//line views/stuff.qtpl:157 + qw422016.N().S(` +`) +//line views/stuff.qtpl:158 + for _, scriptPath := range cfg.OmnipresentScripts { +//line views/stuff.qtpl:158 + qw422016.N().S(` + +`) +//line views/stuff.qtpl:160 + } +//line views/stuff.qtpl:160 + qw422016.N().S(` +`) +//line views/stuff.qtpl:161 +} + +//line views/stuff.qtpl:161 +func writeomnipresentScripts(qq422016 qtio422016.Writer) { +//line views/stuff.qtpl:161 + qw422016 := qt422016.AcquireWriter(qq422016) +//line views/stuff.qtpl:161 + streamomnipresentScripts(qw422016) +//line views/stuff.qtpl:161 + qt422016.ReleaseWriter(qw422016) +//line views/stuff.qtpl:161 +} + +//line views/stuff.qtpl:161 +func omnipresentScripts() string { +//line views/stuff.qtpl:161 + qb422016 := qt422016.AcquireByteBuffer() +//line views/stuff.qtpl:161 + writeomnipresentScripts(qb422016) +//line views/stuff.qtpl:161 + qs422016 := string(qb422016.B) +//line views/stuff.qtpl:161 + qt422016.ReleaseByteBuffer(qb422016) +//line views/stuff.qtpl:161 + return qs422016 +//line views/stuff.qtpl:161 }