Skip to content

Instantly share code, notes, and snippets.

@PhilippIRL
Created December 17, 2017 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PhilippIRL/784f79de494ec679654668eb43f42e71 to your computer and use it in GitHub Desktop.
Save PhilippIRL/784f79de494ec679654668eb43f42e71 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name WhatsApp Web: Rectangular avatars
// @name:de WhatsApp Web: Rechteckige Avatare
// @author PplusS
// @match *://web.whatsapp.com/*
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle(".avatar-image, .avatar { border-radius: 3% !important; }");
@Kurty00
Copy link

Kurty00 commented Jul 19, 2020

WhatsApp changed their class names. (they are probably randomized, but this works for me now.)

// @name         WhatsApp Web: Rectangular avatars
// @name:de      WhatsApp Web: Rechteckige Avatare
// @author       PplusS, Kurty00
// @match        *://web.whatsapp.com/*
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle("html[dir] ._1BjNO, html[dir] ._2goTk, html[dir] ._2H1bg, html[dir] ._3_Hvt { border-radius: 3% !important; }");```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment