Advertisement
shygirl1999

Eve Avatar/Category Adjustment (75x75)

Jul 10th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Eve Avatar/Sub-Category Adjustment (75x75)
  3. // @namespace    erika-mizune-eve-forum-avatar-adjustment-75
  4. // @version      1.0
  5. // @description  Resize forum avatars and readjust subcategory layout
  6. // @author       Erika Mizune
  7. // @match        https://forums.eveonline.com/*
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. /*jshint multistr: true */
  12.  
  13. $('head').append(
  14.     '\
  15. <style>\
  16. span.subcategory { display: table-row !important; }\
  17. .topic-avatar img.avatar { height: 75px; width: 75px; border-radius: 0; }\
  18. .topic-avatar { width: 75px !important; }\
  19. section.embedded-posts.bottom .topic-avatar img.avatar { height: 45px; width: 45px; border-radius: 50%; }\
  20. section.embedded-posts.bottom .topic-avatar { width: 45px !important; }\
  21. section.embedded-posts.top .topic-avatar img.avatar { height: 45px; width: 45px; border-radius: 50%; }\
  22. section.embedded-posts.top .topic-avatar { width: 45px !important; }\
  23. #user-card .user-card-avatar { float: left; margin-right: 10px; margin-top: -30px; }\
  24. #user-card .user-card-avatar img.avatar { border-radius: 0 !important; }\
  25. #user-card h2.username { visibility: hidden; margin-top: -30px; }\
  26. span.second.username { visibility: hidden; }\
  27. </style>\
  28. '
  29. );
  30.  
  31. $(window).on("load resize scroll",function(e){
  32.     var imagelist = Array.from(document.getElementsByTagName('img'));
  33.     imagelist.forEach(function(element) {
  34.         element.src = element.src.replace("/45/", "/90/");
  35.     });
  36.     var botimg = Array.from(document.getElementsByTagName('img'));
  37.     botimg.forEach(function(element) {
  38.         element.src = element.src.replace("https://cdn-enterprise.discourse.org/eveonline/user_avatar/forums.eveonline.com/discobot/90/99_1.png", "http://i.imgur.com/N5G8Mlm.png");
  39.     });
  40.     var botimgsmall = Array.from(document.getElementsByTagName('img'));
  41.     botimgsmall.forEach(function(element) {
  42.         element.src = element.src.replace("https://cdn-enterprise.discourse.org/eveonline/user_avatar/forums.eveonline.com/discobot/25/99_1.png", "http://i.imgur.com/N5G8Mlm.png");
  43.     });
  44.     var botimgmed = Array.from(document.getElementsByTagName('img'));
  45.     botimgmed.forEach(function(element) {
  46.         element.src = element.src.replace("https://cdn-enterprise.discourse.org/eveonline/user_avatar/forums.eveonline.com/discobot/45/99_1.png", "http://i.imgur.com/N5G8Mlm.png");
  47.     });
  48. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement