Compare commits
1 Commits
1.1.2
...
4ec04837ff
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ec04837ff |
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.arindy</groupId>
|
<groupId>de.arindy</groupId>
|
||||||
<artifactId>dice-tower</artifactId>
|
<artifactId>dice-tower</artifactId>
|
||||||
<version>1.1.2</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<compiler-plugin.version>3.13.0</compiler-plugin.version>
|
<compiler-plugin.version>3.13.0</compiler-plugin.version>
|
||||||
|
|||||||
@@ -165,13 +165,6 @@ function hideSnackbar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", async () => {
|
document.addEventListener("DOMContentLoaded", async () => {
|
||||||
|
|
||||||
document.querySelector('meta[property="og:url"]').setAttribute("content", url());
|
|
||||||
document.querySelector('meta[property="twitter:url"]').setAttribute("content", url());
|
|
||||||
document.querySelector('meta[property="og:image"]').setAttribute("content", url() + '/rich.png');
|
|
||||||
document.querySelector('meta[name="twitter:image"]').setAttribute("content", url() + '/rich.png');
|
|
||||||
document.querySelector('meta[property="twitter:domain"]').setAttribute("content", window.location.hostname);
|
|
||||||
|
|
||||||
if (localStorage.getItem('last-name') && localStorage.getItem('last-room')) {
|
if (localStorage.getItem('last-name') && localStorage.getItem('last-room')) {
|
||||||
document.getElementById('name').value = localStorage.getItem('last-name');
|
document.getElementById('name').value = localStorage.getItem('last-name');
|
||||||
document.getElementById('room').value = localStorage.getItem('last-room');
|
document.getElementById('room').value = localStorage.getItem('last-room');
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 206 KiB |
@@ -28,7 +28,7 @@
|
|||||||
ComfyJS.onCommand = async (user, command, message, flags) => {
|
ComfyJS.onCommand = async (user, command, message, flags) => {
|
||||||
if ((
|
if ((
|
||||||
flags.broadcaster || ({modsAllowed} && flags.mod) || ({vipAllowed} && flags.vip) || ({subsAllowed} && flags.subscriber
|
flags.broadcaster || ({modsAllowed} && flags.mod) || ({vipAllowed} && flags.vip) || ({subsAllowed} && flags.subscriber
|
||||||
)) && '{cmd}' === command && !shouldWait() && message.match(/^\d+d(4|6|8|10|12|20|100)$/) && (+message.split('d')[0] <= {maxDice})
|
)) && '{cmd}' === command && !shouldWait() && message.match(/\d+d(4|6|8|10|12|20|100)/) && (+message.split('d')[0] <= {maxDice})
|
||||||
) {
|
) {
|
||||||
toggleWait(true);
|
toggleWait(true);
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
result.rolls.forEach(roll => {
|
result.rolls.forEach(roll => {
|
||||||
values.push(roll.value);
|
values.push(roll.value);
|
||||||
})
|
})
|
||||||
document.getElementById('results').innerHTML = '<strong>' + user + '</strong> rolls <strong>' + message + '</strong>:<br/> [' + values.map(value => value === 1 ? '<strong style="text-shadow: 2px 2px 10px red">' + value + '</strong>' : value === result.sides ? '<strong style="text-shadow: 2px 2px 10px green">' + value + '</strong>' : value).join(' + ') + (result.modifier > 0 ? ' <a style="text-decoration: underline">+' + result.modifier + '</a>' : result.modifier < 0 ? ' <a style="text-decoration: underline">' + result.modifier + '</a>' : '') + '] = <strong>' + result.value + '</strong> '
|
document.getElementById('results').innerHTML = '<strong>  D' + result.sides + '</strong>: [' + values.map(value => value === 1 ? '<strong style="text-shadow: 2px 2px 10px red">' + value + '</strong>' : value === result.sides ? '<strong style="text-shadow: 2px 2px 10px green">' + value + '</strong>' : value).join(' + ') + (result.modifier > 0 ? ' <a style="text-decoration: underline">+' + result.modifier + '</a>' : result.modifier < 0 ? ' <a style="text-decoration: underline">' + result.modifier + '</a>' : '') + '] = <strong>' + result.value + '</strong> '
|
||||||
})
|
})
|
||||||
document.getElementById('results').showPopover()
|
document.getElementById('results').showPopover()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -38,8 +38,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<label for="channel">Channel </label>
|
<label for="channel">Channel </label>
|
||||||
<input type="text" id="channel" style="width: 400px; margin-top: 20px" value="arindy"/>
|
<input type="text" id="channel" style="width: 400px; margin-top: 20px" value="arindy"/>
|
||||||
<label for="cmd">Command !</label>
|
<label for="cmd">Command </label>
|
||||||
<input type="text" id="cmd" style="width: 100px; margin-top: 20px; margin-left: 0" value="roll"/>
|
<input type="text" id="cmd" style="width: 100px; margin-top: 20px" value="roll"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="checkbox" id="modsAllowed-container">Allow mods to roll
|
<label class="checkbox" id="modsAllowed-container">Allow mods to roll
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="scale">Dice-Scale </label>
|
<label for="scale">Dice-Scale </label>
|
||||||
<input type="number" id="scale" style="width: 50px; margin-top: 20px" value="9"/>
|
<input type="number" id="scale" style="width: 50px; margin-top: 20px" value="7"/>
|
||||||
<label for="maxDice">Max number of dice </label>
|
<label for="maxDice">Max number of dice </label>
|
||||||
<input type="number" id="maxDice" style="width: 50px; margin-top: 20px" value="20"/>
|
<input type="number" id="maxDice" style="width: 50px; margin-top: 20px" value="20"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<label for="clearAfter">Clear dice after (in seconds)</label>
|
<label for="clearAfter">Clear dice after (in seconds)</label>
|
||||||
<input type="number" id="clearAfter" style="width: 50px; margin-top: 20px" value="10"/>
|
<input type="number" id="clearAfter" style="width: 50px; margin-top: 20px" value="10"/>
|
||||||
<label for="timeout">Command-timeout (in seconds)</label>
|
<label for="timeout">Command-timeout (in seconds)</label>
|
||||||
<input type="number" id="timeout" style="width: 50px; margin-top: 20px" value="60"/>
|
<input type="number" id="timeout" style="width: 50px; margin-top: 20px" value="10"/>
|
||||||
</div>
|
</div>
|
||||||
<div id="dice-box" style="height: 400px"></div>
|
<div id="dice-box" style="height: 400px"></div>
|
||||||
<button style="margin: 10px" id="preview">Preview <i class="fa-solid fa-magnifying-glass"></i></button>
|
<button style="margin: 10px" id="preview">Preview <i class="fa-solid fa-magnifying-glass"></i></button>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
"/chatoverlay/" + document.getElementById('channel').value +
|
"/chatoverlay/" + document.getElementById('channel').value +
|
||||||
"?cmd=" + document.getElementById('cmd').value +
|
"?cmd=" + document.getElementById('cmd').value +
|
||||||
"&theme=" + document.getElementById('theme').value +
|
"&theme=" + document.getElementById('theme').value +
|
||||||
"&themeColor=" + encodeURIComponent(document.getElementById('themeColor').value) +
|
"&themeColor=" + document.getElementById('themeColor').value +
|
||||||
"&scale=" + document.getElementById('scale').value +
|
"&scale=" + document.getElementById('scale').value +
|
||||||
"&maxDice=" + document.getElementById('maxDice').value +
|
"&maxDice=" + document.getElementById('maxDice').value +
|
||||||
"&clearAfter=" + document.getElementById('clearAfter').value +
|
"&clearAfter=" + document.getElementById('clearAfter').value +
|
||||||
|
|||||||
@@ -3,25 +3,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Dice-Tower</title>
|
<title>Dice-Tower</title>
|
||||||
|
|
||||||
<meta property="og:title" content="Dice-Tower">
|
|
||||||
<meta name="twitter:title" content="Dice-Tower">
|
|
||||||
|
|
||||||
<meta property="og:type" content="website">
|
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
|
||||||
|
|
||||||
<meta property="og:url" content="https://dice-tower.com">
|
|
||||||
<meta property="twitter:url" content="https://dice-tower.com">
|
|
||||||
|
|
||||||
<meta property="twitter:domain" content="dice-tower.com">
|
|
||||||
|
|
||||||
<meta property="og:image" content="https://dice-tower.com/rich.png">
|
|
||||||
<meta name="twitter:image" content="https://dice-tower.com/rich.png">
|
|
||||||
|
|
||||||
<meta name="description" content="
|
|
||||||
Easy to use online dice rolling with customizable overlays.
|
|
||||||
">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="/vendor/w3css/4/w3.css">
|
<link rel="stylesheet" href="/vendor/w3css/4/w3.css">
|
||||||
<link rel="stylesheet" href="/vendor/font-awesome/css/fontawesome.css">
|
<link rel="stylesheet" href="/vendor/font-awesome/css/fontawesome.css">
|
||||||
<link rel="stylesheet" href="/vendor/font-awesome/css/all.css">
|
<link rel="stylesheet" href="/vendor/font-awesome/css/all.css">
|
||||||
@@ -195,7 +176,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 20px; flex-grow: 1" id="chatOverlay">
|
<div style="margin-top: 20px; flex-grow: 1" id="chatOverlay">
|
||||||
<div class="w3-panel w3-theme-l4 w3-card w3-display-container" style="padding: 25px; margin-bottom: auto">
|
<div class="w3-panel w3-theme-l4 w3-card w3-display-container" style="padding: 25px; margin-bottom: auto">
|
||||||
If you are looking for a way to let your twitch chat roll click <a href target="_blank" id="chatOverlayLink">here</a>
|
If you are looking for a way to let chat roll click <a href target="_blank" id="chatOverlayLink">here</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user