#629 {{roll}} replacement macros

This commit is contained in:
Cohee
2023-07-18 19:51:20 +03:00
parent 623675d940
commit 9e21534fae
4 changed files with 23 additions and 12 deletions

View File

@@ -76,20 +76,11 @@ function addDiceRollButton() {
});
}
function addDiceScript() {
if (!window.droll) {
const script = document.createElement('script');
script.src = "/scripts/extensions/dice/droll.js";
document.body.appendChild(script);
}
}
async function moduleWorker() {
$('#roll_dice').toggle(getContext().onlineStatus !== 'no_connection');
}
jQuery(function () {
addDiceScript();
addDiceRollButton();
moduleWorker();
setInterval(moduleWorker, UPDATE_INTERVAL);