Created
October 27, 2020 09:22
-
-
Save KevCui/23ddf37a256736d5f7af860a5b70df22 to your computer and use it in GitHub Desktop.
Change circle GitHub avatars to square ones
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub Square Avatar | |
// @author KevCui | |
// @match https://*.github.com/* | |
// @grant none | |
// ==/UserScript== | |
function changeAvatarStyle() { | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = '.avatar-user {border-radius: 6px !important;}'; | |
var avatars = document.getElementsByClassName('avatar-user'); | |
Array.prototype.forEach.call(avatars, function(avatar) { | |
avatar.appendChild(style); | |
}); | |
} | |
window.addEventListener('load', function() { | |
changeAvatarStyle(); | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment