[UserScript] Avatar Size & Sub-Category Adjustment

Today I found out the forum uses 90px avatars by default, so I publish new script with the images being fixed. Now they should not be displayed as 90px versions, but bigger and clearer ones, 240px.

// ==UserScript==
// @name         Eve Avatar/Sub-Category Adjustment (120x120)
// @namespace    erika-mizune-eve-forum-avatar-adjustment-120
// @version      1.0
// @description  Resize forum avatars and readjust subcategory layout
// @author       Erika Mizune
// @match        https://forums.eveonline.com/*
// @grant        none
// ==/UserScript==

/*jshint multistr: true */

$('head').append(
    '\
<style>\
span.subcategory { display: table-row !important; }\
.topic-avatar img.avatar { height: 140px; width: 140px; border-radius: 0; }\
.topic-avatar { width: 140px !important; }\
section.embedded-posts.bottom .topic-avatar img.avatar { height: 45px; width: 45px; border-radius: 50%; }\
section.embedded-posts.bottom .topic-avatar { width: 45px !important; }\
section.embedded-posts.top .topic-avatar img.avatar { height: 45px; width: 45px; border-radius: 50%; }\
section.embedded-posts.top .topic-avatar { width: 45px !important; }\
#user-card .user-card-avatar { float: left; margin-right: 10px; margin-top: -25px; }\
#user-card .user-card-avatar img.avatar { border-radius: 0 !important; }\
#user-card h2.username { visibility: hidden; margin-top: -30px; }\
span.second.username { visibility: hidden; }\
</style>\
'
);

$(window).on("load resize scroll",function(e){
    var imagelist = Array.from(document.getElementsByTagName('img'));
    imagelist.forEach(function(element) {
        element.src = element.src.replace("/90/", "/240/");
    });
});
1 Like