Skip to content

Commit 2602c4f

Browse files
committed
Update utils.js
1 parent b05ce0b commit 2602c4f

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

utils.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const body = document.body,
6868

6969

7070
// version
71-
const version = '3.2.0';
71+
const version = '3.2.5';
7272
versionEl.innerText = version;
7373

7474
let logVersion = () => {
@@ -142,6 +142,22 @@ function showMessage(message, duration) {
142142
}
143143

144144

145+
// show dialog
146+
function showDialog(confirmHandler, headerText, confirmText) {
147+
148+
// add dialog text to HTML
149+
dialogHeader.textContent = headerText;
150+
dialogConfirm.textContent = confirmText;
151+
152+
// show dialog
153+
dialogWrapper.classList.add('visible');
154+
155+
// add confirm button click listener
156+
dialogConfirm.onclick = confirmHandler;
157+
158+
}
159+
160+
145161

146162
// device and platform queries
147163

0 commit comments

Comments
 (0)