Compare commits
2 Commits
b925c85c22
...
9c8c9086b4
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c8c9086b4 | |||
| f6c48454de |
@ -1,7 +1,7 @@
|
||||
// Register Service Worker
|
||||
if ("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker.register(
|
||||
new URL("service-worker.js", import.meta.url), { type: "module" }
|
||||
new URL("./service-worker.js"), { type: "module" }
|
||||
).then( (registration) => {
|
||||
console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
||||
}, (err) => {
|
||||
@ -74,6 +74,9 @@ const PHYSICAL_BADGE_HTML = '<sub><span class="badge bg-danger position-absolute
|
||||
|
||||
// roll for initiative with the given reaction and number of ini dice
|
||||
function rollForInitiative(dice, rea) {
|
||||
if (isNaN(parseInt(dice)) || isNaN(parseInt(rea))) {
|
||||
return 0;
|
||||
}
|
||||
let diceRolls = Array.from({ length: parseInt(dice) }, () => Math.ceil(Math.random() * 6));
|
||||
return diceRolls.reduce((a, b) => a + b, 0) + parseInt(rea);
|
||||
}
|
||||
|
||||
2
tools/jquery-latest.min.js
vendored
Normal file
2
tools/jquery-latest.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user