admin: Improve file readability

This commit is contained in:
nemunaire 2024-03-17 16:03:40 +01:00
parent a0cd651dae
commit d323bf9ee9
3 changed files with 26 additions and 3 deletions

View file

@ -200,6 +200,18 @@ angular.module("FICApp")
else
return "";
}
})
.filter("bto16", function() {
return function(input) {
const raw = atob(input);
let result = '';
for (let i = 0; i < raw.length; i++) {
const hex = raw.charCodeAt(i).toString(16);
result += (hex.length === 2 ? hex : '0' + hex);
}
return result;
}
});
angular.module("FICApp")