Skip to content

Commit

Permalink
fixed issue with \ changing theme but not images
Browse files Browse the repository at this point in the history
  • Loading branch information
torvos committed Jul 24, 2024
1 parent b7d23f5 commit 03a792f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions articles/website.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@ <h5>
updateImages();
}, 1);
});

document.addEventListener('keydown', event => {
if (
event.key === '\\' &&
!event.composedPath().some(el => ['input', 'textarea'].includes(el?.tagName?.toLowerCase()))
) {
event.preventDefault();
setTimeout(function (){
updateImages();
}, 1);
}
});

</script>
</wa-page>
Expand Down

0 comments on commit 03a792f

Please sign in to comment.