mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
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.
This commit is contained in:
parent
49b1b228bd
commit
c5d80e9f7a
1 changed files with 3 additions and 0 deletions
|
@ -12,6 +12,9 @@ created using <a href="https://aider.chat">aider</a>.
|
|||
window.onload = function() {
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var conv = urlParams.get('mdurl');
|
||||
if (!conv) {
|
||||
return;
|
||||
}
|
||||
fetch(conv)
|
||||
.then(response => response.text())
|
||||
.then(markdown => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue