[OpenAPI] stripping double quotes at the beginning and the end of the response. fixes #99
This commit is contained in:
parent
ffc5c465ce
commit
ff1c7b1fc1
1 changed files with 2 additions and 1 deletions
|
|
@ -227,7 +227,8 @@ class MessagesArea extends HTMLElement {
|
||||||
const actionButton = document.createElement('button');
|
const actionButton = document.createElement('button');
|
||||||
actionButton.textContent = 'Use this answer';
|
actionButton.textContent = 'Use this answer';
|
||||||
//actionButton.textContent = browser.i18n.getMessage("chatgpt_win_get_answer");
|
//actionButton.textContent = browser.i18n.getMessage("chatgpt_win_get_answer");
|
||||||
const fullTextHTMLAtAssignment = this.fullTextHTML;
|
const fullTextHTMLAtAssignment = this.fullTextHTML.trim().replace(/^"|"$/g, '').replace(/^<p>"/, '<p>').replace(/"<\/p>$/, '</p>'); // strip quotation marks
|
||||||
|
//console.log(">>>>>>>>>>>> fullTextHTMLAtAssignment: " + fullTextHTMLAtAssignment);
|
||||||
actionButton.addEventListener('click', () => {
|
actionButton.addEventListener('click', () => {
|
||||||
switch(promptData.action) {
|
switch(promptData.action) {
|
||||||
case "1": // do reply
|
case "1": // do reply
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue