mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Add support for injecting HTML before the </head> tag in inject plugin
This commit is contained in:
parent
d90b980cc6
commit
eae5439861
2 changed files with 15 additions and 3 deletions
|
|
@ -1,3 +1,6 @@
|
|||
{% if INJECT_BODY != "" +%}
|
||||
sub_filter '</body>' '{{ INJECT_BODY }}</body>';
|
||||
{% endif %}
|
||||
{% if INJECT_HEAD != "" +%}
|
||||
sub_filter '</head>' '{{ INJECT_HEAD }}</head>';
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,25 @@
|
|||
{
|
||||
"id": "inject",
|
||||
"name": "HTML injection",
|
||||
"description": "Inject custom HTML code before the </body> tag.",
|
||||
"description": "Inject custom HTML code before either the </body> or </head> tag.",
|
||||
"version": "1.0",
|
||||
"stream": "no",
|
||||
"settings": {
|
||||
"INJECT_BODY": {
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"help": "The HTML code to inject.",
|
||||
"help": "The HTML code to inject before the </body> tag.",
|
||||
"id": "inject-body",
|
||||
"label": "HTML code",
|
||||
"label": "body HTML code",
|
||||
"regex": "^.*$",
|
||||
"type": "text"
|
||||
},
|
||||
"INJECT_HEAD": {
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"help": "The HTML code to inject before the </head> tag.",
|
||||
"id": "inject-body",
|
||||
"label": "head HTML code",
|
||||
"regex": "^.*$",
|
||||
"type": "text"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue