Skip to content

Instantly share code, notes, and snippets.

@andersonbosa
Created July 3, 2021 17:22
Show Gist options
  • Save andersonbosa/3840be1e194a62c9571a15d66d8460a9 to your computer and use it in GitHub Desktop.
Save andersonbosa/3840be1e194a62c9571a15d66d8460a9 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name chats toggle button - whatsapp.com
// @match https://web.whatsapp.com/
// @version 1.0
// @author https://github.com/andersonbosa
// @description 7/3/2021, 2:20:32 PM
// ==/UserScript==
function addToggleButton () {
// creating
const smileBtn = window.document.querySelector('[data-state="closed"]')
const newBtn = smileBtn.cloneNode(true)
// adding
parentDiv = smileBtn.parentNode
parentDiv.appendChild(newBtn)
}
addToggleButton()
// problems:
// each new chat need readd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment