mirror of https://github.com/gophish/gophish
Fixing template tracking. Fixes #361
parent
103fd72cc8
commit
b7a2af338b
|
@ -24,10 +24,11 @@ function save(idx) {
|
||||||
// Fix the URL Scheme added by CKEditor (until we can remove it from the plugin)
|
// Fix the URL Scheme added by CKEditor (until we can remove it from the plugin)
|
||||||
template.html = template.html.replace(/https?:\/\/{{\.URL}}/gi, "{{.URL}}")
|
template.html = template.html.replace(/https?:\/\/{{\.URL}}/gi, "{{.URL}}")
|
||||||
// If the "Add Tracker Image" checkbox is checked, add the tracker
|
// If the "Add Tracker Image" checkbox is checked, add the tracker
|
||||||
if ($("#use_tracker_checkbox").prop("checked") &&
|
if ($("#use_tracker_checkbox").prop("checked")) {
|
||||||
template.html.indexOf("{{.Tracker}}") == -1 &&
|
if (template.html.indexOf("{{.Tracker}}") == -1 &&
|
||||||
template.html.indexOf("{{.TrackingUrl}}") == -1) {
|
template.html.indexOf("{{.TrackingUrl}}") == -1) {
|
||||||
template.html = template.html.replace("</body>", "{{.Tracker}}</body>")
|
template.html = template.html.replace("</body>", "{{.Tracker}}</body>")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, remove the tracker
|
// Otherwise, remove the tracker
|
||||||
template.html = template.html.replace("{{.Tracker}}</body>", "</body>")
|
template.html = template.html.replace("{{.Tracker}}</body>", "</body>")
|
||||||
|
|
Loading…
Reference in New Issue