2018-05-14 01:01:34 +00:00
|
|
|
bdwatcher = null, bdtag = null, setupCSS = function (n) {
|
|
|
|
var e = fs.readFileSync(n, "utf-8");
|
|
|
|
null === bdtag && (bdtag = document.createElement("style"), document.head.appendChild(bdtag)), bdtag.innerHTML = e, null === bdwatcher && (bdwatcher = fs.watch(n, {
|
|
|
|
encoding: "utf-8"
|
|
|
|
}, function (e, w) {
|
|
|
|
if ("change" === e) {
|
|
|
|
var i = fs.readFileSync(n, "utf-8");
|
|
|
|
bdtag.innerHTML = i
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
};
|
|
|
|
|
2018-05-14 12:42:48 +00:00
|
|
|
exports.manifest = {
|
2018-05-14 01:01:34 +00:00
|
|
|
author: "dr1ft",
|
|
|
|
name: "BeautifulDiscord Port",
|
2018-05-14 12:42:48 +00:00
|
|
|
description: "Allows CSS to be imported and updated on the fly."
|
2018-05-14 01:01:34 +00:00
|
|
|
},
|
|
|
|
exports.start = () => {
|
|
|
|
if (fs.existsSync($api.data + 'style.css'))
|
|
|
|
setupCSS($api.data + 'style.css');
|
|
|
|
}
|