Skip to content

Add a "Hide all Chats" button #3287

@apollo-jhn

Description

@apollo-jhn

I created this lame code to delete all of my conversations using Javascript, which I then put on my browser's developer console to run.

// Version 2.0
var xpath = "/html/body/div[1]/div/div/div[2]/div[1]/div/div[2]/div[1]/div[2]/div/div/div";
var elements = document.evaluate(xpath + '//a', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
var aTag_count = elements.snapshotLength;
console.log(aTag_count);

for (let i = 0; i < aTag_count; i++) {
    var DeleteConversation_button = document.evaluate(xpath + '//a[' + (i + 1) + ']/span/div/div/div/button[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

    if (DeleteConversation_button) {
        DeleteConversation_button.click();
    } else {
        console.log("Delete Conversation button not found.");
    }
}

setTimeout(function() {
    for (let i = 0; i < aTag_count; i++) {
        var Dialog_button = document.evaluate(xpath + '//a[' + (i + 1) + ']/span/div/div[2]/div/div[2]/div/section/footer/button[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
        if (Dialog_button) {
            Dialog_button.click();
        } else {
            console.log("Dialog button not found.");
        }
    }
}, 200); // 200 milisecond delay

But I'm suggesting having something like a "Hide all Conversations" button or checkboxes to select a particular conversation to be deleted, hidden, or opted out of. I know that opting out and deleting is a bad idea for the sake of training the model.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

⚙ In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions