Skip to content

Commit

Permalink
Deploying to gh-pages from @ 9c37259 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Honry committed Jun 21, 2024
1 parent 3c90202 commit be41205
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nnotepad/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ document.addEventListener('DOMContentLoaded', async (e) => {
disableMonospaceOptimizations: true,
});

editor.onDidChangeModelContent(() => {
refresh();
});

async function refresh(e) {
const code = editor.getValue();
$('#output').innerText = '';
Expand Down Expand Up @@ -59,7 +63,6 @@ document.addEventListener('DOMContentLoaded', async (e) => {
}
}

$('#input').addEventListener('input', Util.debounce(refresh, 500));
$('#device').addEventListener('change', refresh);

refresh();
Expand All @@ -71,6 +74,7 @@ document.addEventListener('DOMContentLoaded', async (e) => {
);
$$('dialog').forEach((dialog) => {
dialog.addEventListener('click', (e) => {
if (e.target !== dialog) return;
const rect = e.target.getBoundingClientRect();
if (
e.clientY < rect.top ||
Expand Down

0 comments on commit be41205

Please sign in to comment.