aider/share
Paul Gauthier c5d80e9f7a aider: Check if there is a mdurl param and skip the rest if not.
# Aider chat conversation:

USER: check to make sure there is a mdurl param, skip the rest if not

ASSISTANT: To implement this change, we need to modify the `share/index.md` file. We will add a condition to check if the `mdurl` parameter exists before proceeding with the rest of the script.

Here is the proposed change:

```markdown
share/index.md
<<<<<<< ORIGINAL
window.onload = function() {
    var urlParams = new URLSearchParams(window.location.search);
    var conv = urlParams.get('mdurl');
    fetch(conv)
=======
window.onload = function() {
    var urlParams = new URLSearchParams(window.location.search);
    var conv = urlParams.get('mdurl');
    if (!conv) {
        return;
    }
    fetch(conv)
>>>>>>> UPDATED
```

This change checks if `conv` (which holds the value of the `mdurl` parameter) is not present. If it's not, the function returns immediately, skipping the rest of the script.
2023-08-07 11:10:28 -03:00
..
index.md aider: Check if there is a mdurl param and skip the rest if not. 2023-08-07 11:10:28 -03:00