Skip to content

Commit

Permalink
bugfix compare tool
Browse files Browse the repository at this point in the history
  • Loading branch information
stoerr committed Dec 5, 2024
1 parent d2c3a23 commit f97461d
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,12 @@
// Event listeners for URL input fields
leftField.addEventListener('change', function () {
leftLoaded = false;
try {
const url = new URL(this.value);
leftIframe.src = DOMPurify.sanitize(url.href);
} catch (e) {
console.error('Invalid URL:', this.value);
}
leftIframe.src = DOMPurify.sanitize(url.href);
});

rightField.addEventListener('change', function () {
rightLoaded = false;
try {
const url = new URL(this.value);
rightIframe.src = DOMPurify.sanitize(url.href);
} catch (e) {
console.error('Invalid URL:', this.value);
}
rightIframe.src = DOMPurify.sanitize(this.value);
});

// Function to parse URL parameters
Expand Down

0 comments on commit f97461d

Please sign in to comment.