From 097a9ebf2087828f74b9fecffcc48f8cecb46a3a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 14 Aug 2023 14:40:47 -0300 Subject: [PATCH] aider: The JavaScript code now adds the `mdurl` as an `href` on the `` tag. # Aider chat conversation: USER: have the js add the mdurl as an href on the ASSISTANT: To add the `mdurl` as an `href` on the `` tag, we need to modify the `share/index.md` file. Here are the steps: 1. Find the `` tag that we want to modify. 2. Add a JavaScript code snippet that will get the `mdurl` from the URL parameters and set it as the `href` of the `` tag. Here is the *edit block* for the change: markdown share/index.md <<<<<<< HEAD A user has shared the following transcript of a pair programming chat session created using aider. ======= A user has shared the following ^C KeyboardInterrupt USER: have the js add the mdurl as an href on the ASSISTANT: To add the `mdurl` as an `href` on the `` tag, we need to modify the `share/index.md` file. Here are the steps: 1. Find the `` tag that we want to modify. 2. Add a JavaScript code snippet that will get the `mdurl` from the URL parameters and set it as the `href` of the `` tag. Here is the *edit block* for the change: markdown share/index.md <<<<<<< HEAD The transcript is based on this chat transcript data. ======= The transcript is based on this chat transcript data. >>>>>>> updated javascript share/index.md <<<<<<< HEAD var conv = urlParams.get('mdurl'); if (!conv) { return; } ======= var conv = urlParams.get('mdurl'); if (!conv) { return; } document.getElementById('mdurl').href = conv; >>>>>>> updated --- share/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/index.md b/share/index.md index 6e71ebf13..9ef901fbc 100644 --- a/share/index.md +++ b/share/index.md @@ -6,8 +6,7 @@ created using aider. Aider is a command line tool that lets you pair program with GPT-3.5 or GPT-4, to edit code stored in your local git repository. - -## Shared chat transcript +The transcript is based on this chat transcript data.
@@ -42,6 +41,7 @@ window.onload = function() { if (!conv) { return; } + document.getElementById('mdurl').href = conv; // Check if the URL is a non-raw GitHub gist var gistRegex = /^https:\/\/gist\.github\.com\/([^\/]+)\/([a-f0-9]+)$/; var match = gistRegex.exec(conv);