Skip to content

Commit e2d711f

Browse files
committed
Request ANSI colour codes when calling gravity API
Add the 'color=true' query parameter to the gravity API call so that the FTL backend will include ANSI escape codes for terminal color output. This works in conjunction with FTL changes that make color codes opt-in rather than always-on. Addresses: pi-hole/FTL#2671
1 parent 2414163 commit e2d711f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/js/gravity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function eventsource() {
1515
const outputElement = document.getElementById("output");
1616
const gravityBtn = document.getElementById("gravityBtn");
1717
const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute("content");
18-
const url = `${document.body.dataset.apiurl}/action/gravity`;
18+
const url = `${document.body.dataset.apiurl}/action/gravity?color=true`;
1919

2020
if (outputElement.innerHTML.length > 0) {
2121
outputElement.innerHTML = "";

0 commit comments

Comments
 (0)