allproxy
Version:
AllProxy: MITM HTTP Debugging Tool.
25 lines • 774 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.pickButtonStyle = void 0;
const colorStyles = [
{ background: "#4589ff", color: "white" },
{ background: "#198038", color: "white" },
{ background: "#a2191f", color: "white" },
{ background: "#d2a106", color: "white" },
{ background: "#8a3ffc", color: "white" }, // violet
];
let index = 0;
const styleMap = {};
function pickButtonStyle(name) {
let style = styleMap[name];
if (style === undefined) {
style = colorStyles[index];
styleMap[name] = style;
++index;
if (index == colorStyles.length)
index = 0;
}
return style;
}
exports.pickButtonStyle = pickButtonStyle;
//# sourceMappingURL=PickButtonStyle.js.map