399128c208
Added a template minifier which strips out many types of whitespace. Stop the router from blocking the other goroutines. Content is no longer an interface{} in the TopicUser and Reply structs Allow plugins to add new routes without any potential race coditions occuring Use non-breaking spaces in the topic view to make it harder for the minifier to break things.
22 lines
660 B
Go
22 lines
660 B
Go
package main
|
|
|
|
func init() {
|
|
plugins["helloworld"] = NewPlugin("helloworld","Hello World","Azareal","http://github.com/Azareal","","","",init_helloworld,nil,deactivate_helloworld)
|
|
}
|
|
|
|
// init_helloworld is separate from init() as we don't want the plugin to run if the plugin is disabled
|
|
func init_helloworld() {
|
|
plugins["helloworld"].AddHook("rrow_assign", helloworld_reply)
|
|
}
|
|
|
|
func deactivate_helloworld() {
|
|
plugins["helloworld"].RemoveHook("rrow_assign", helloworld_reply)
|
|
}
|
|
|
|
func helloworld_reply(data interface{}) interface{} {
|
|
reply := data.(Reply)
|
|
reply.Content = "Hello World!"
|
|
reply.ContentHtml = "Hello World!"
|
|
reply.Tag = "Auto"
|
|
return reply
|
|
} |