fixed the plain text import. fixes #87
This commit is contained in:
parent
011076d96b
commit
7323a9fe6f
1 changed files with 2 additions and 1 deletions
|
|
@ -75,7 +75,8 @@ async function chatgpt_getFromDOM(pos) {
|
|||
let doc = parser.parseFromString(responseDivs[responseDivs.length - 1].innerHTML, 'text/html');
|
||||
if(!mztaKeepFormatting) { // Return only TEXT
|
||||
// Select the div with class 'empty:hidden'
|
||||
response = responseDivs[responseDivs.length - 1].textContent;
|
||||
let correct_div = responseDivs[responseDivs.length - 1].querySelector('div[data-message-author-role="assistant"]');
|
||||
response = correct_div.textContent;
|
||||
//console.log(">>>>>>>>>> response: " + response);
|
||||
response = response.replace(/^ChatGPT(?:ChatGPT)?/, ''); // strip sender name
|
||||
response = response.trim().replace(/^"|"$/g, ''); // strip quotation marks
|
||||
|
|
|
|||
Loading…
Reference in a new issue