(() => {
const colorKeys = [
"ThreeDFace",
"ThreeDShadow",
"ThreeDHighlight",
"ButtonText",
];
const colors = (() => {
const colors = {};
const elem = document.createElement("div");
document.body.appendChild(elem);
for (const key of colorKeys) {
elem.style.color = key;
colors[key] = window.getComputedStyle(elem).color;
}
document.body.removeChild(elem);
return colors;
})();
const css = `#main-window:not([sizemode="maximized"]) #browser-bottombox::after {
background-image: url('data:image/svg+xml,');
}
.checkbox-check[checked] {
background-image: url('data:image/svg+xml,') !important;
}
.findbar-find-next .toolbarbutton-icon {
background-image: url('data:image/svg+xml,') !important;
}
.findbar-find-next[disabled="true"] .toolbarbutton-icon {
background-image: url('data:image/svg+xml,') !important;
}
.findbar-find-previous .toolbarbutton-icon {
background-image: url('data:image/svg+xml,') !important;
}
.findbar-find-previous[disabled="true"] .toolbarbutton-icon {
background-image: url('data:image/svg+xml,') !important;
}`;
const sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(
Ci.nsIStyleSheetService,
);
const uri = Services.io.newURI(
"data:text/css;charset=UTF=8," + encodeURIComponent(css),
);
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
})();