Greasy Fork is available in English.

Better MAL Favs

Choose how you want profile favorites to look like.

Mint 2022.05.20.. Lásd a legutóbbi verzió

// ==UserScript==
// @name         Better MAL Favs
// @namespace    https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
// @version      8
// @description  Choose how you want profile favorites to look like.
// @author       hacker09 & Shishio-kun
// @match        https://myanimelist.net/profile/*/
// @icon         https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://myanimelist.net&size=64
// @grant        GM_registerMenuCommand
// @run-at       document-end
// @grant        GM_getValue
// @grant        GM_setValue
// ==/UserScript==

(function() {
  'use strict';
  var hide = '1'; //Define the fav info as visible
  var CompaniesPosition = 'relative !important'; //Define the companies column position to show below all other tables
  GM_registerMenuCommand("Choose MAL Favs Styles", function() { //Creates a new function
    var UserInput = prompt('1 Actual style showing all favs titles and names\n\n2 Vertical style\n\n3 Vertical style with big images\n\n4 Vertical style without franchise name/year\n\n5 Vertical style with big images and without franchise name/year\n*Write only your choice number and click OK'); //Gets the user input
    GM_setValue("Choice", UserInput); //Defines the variable as the UserInput

    var UserInput2 = prompt('1 Allways move the companies table to the right.\n\n2 Show the companies table below all other tables\n*Write only your choice number and click OK'); //Gets the user input
    GM_setValue("CompaniesTablePosition", UserInput2); //Defines the variable as the UserInput
    location.reload(); //Reloads the page
  }); //Adds an option to the menu and finishes the function

  if (GM_getValue("Choice") === undefined) { //If the variable doesn't exist yet
    alert('Click on the TamperMonkey extension icon, and click on the button "Choose MAL Favs Styles", to chose how you want the MAL favs to look like by default.'); //Shows how to config the script
  } //Finishes the if condition

  if (GM_getValue("Choice") === '1') { //If the user chose option 1
    document.head.insertAdjacentHTML('beforeend', '<style>.fav-slide-block .fav-slide .btn-fav .link .title, .fav-slide-block .fav-slide .btn-fav .link .users {opacity: unset;}</style>'); //Show the titles by default
  } //Finishes the if condition

  if (GM_getValue("Choice").match(/4|5/) !== null) { //If the user chose option 4 or 5
    hide = '0'; //Hide the fav info
  } //Finishes the if condition

  if (GM_getValue("CompaniesTablePosition") === '1' && document.querySelector("div.favmore").innerText.match('People ') !== null && GM_getValue("Choice") !== '1') { //If the user chose option 1 and the companies column is below all other columns, and if the user didn't choose option 1
    CompaniesPosition = 'absolute !important'; //Define the companies column position to show below all other tables
    document.head.insertAdjacentHTML('beforeend', `<style>#company_favorites { position: ${CompaniesPosition}; left: 1050px; background: #FFFFFF; } #content > div > div.container-right > div.favmore > h5:nth-child(3){ position: absolute !important; left: 1050px; margin-top: -38px; background: #FFFFFF; padding-bottom: 10px; padding-top: 10px; width: 200px !important; } #company_favorites .fav-slide-outer{ background: #FFFFFF; } #content > div > div.container-right > div.favmore > h5:nth-child(3):before{ content: "";  position: absolute; width: 100px; height: 23px; border-bottom: #f0f0f0 1px solid !important; }</style>`); //Make the companies column show on the right side By Shishio-kun style 238158
  } //Finishes the if condition

  if (GM_getValue("Choice").match(/2|4/) !== null) { //If the user chose option 2 or 4
    document.head.insertAdjacentHTML('beforeend', `<style>.fav-slide-block .fav-slide {display: table-cell; width: 100px !important; }.fav-slide-block .fav-slide .btn-fav {padding-bottom: 10px !important; }.fav-slide-block .fav-slide-outer {height: auto;width: 200px !important; }.fav-slide-block .fav-slide .btn-fav .link img {background-color: transparent; }#anime_favorites {height: auto !important; width: 198px;position: relative !important; position: relative; float: left;}#anime_favorites:hover {overflow-y: auto; }div#manga_favorites.fav-slide-block.mb12 {height: auto !important; width: 198px;position: relative !important; scrollbar-width: thin; padding-left: 2px; position: relative; float: left;}div#manga_favorites.fav-slide-block.mb12:hover {overflow-y: auto; }#character_favorites {height: auto !important; width: 198px;position: relative !important; scrollbar-width: thin; padding-left: 2px; position: relative; float: left;}#character_favorites:hover {overflow-y: auto; }#person_favorites {height: auto !important; width: 198px;position: relative !important; scrollbar-width: thin; padding-left: 2px; position: relative; float: left;}#person_favorites:hover {overflow-y: auto; }.fav-slide-block .fav-slide {position: relative; }.favmore{display: block !important; }.container-right > h5:nth-child(6) {position: absolute; left: 450px;margin-top: -25px !important; }.favmore > h5:nth-child(1) {position: absolute; left: 850px;margin-top: -25px !important; }.container-right > h5:nth-child(8) {position: absolute; left: 650px;margin-top: -25px !important; }.btn-favmore.open, .btn-favmore,.fav-slide-block .btn-fav-slide-side {opacity: 0 !important; pointer-events: none; }.page-common .content-container .pt24 {position: relative; float: left;top: -60px;}.fav-slide-block .lazyloaded {width: 40px;height: 60px;}.fav-slide-block .lazyloaded {width: 40px;height: 60px;image-rendering: inherit; image-rendering: -webkit-optimize-contrast; }.fav-slide-block .fav-slide .btn-fav .link {height: 55px;}/* CLASSIC FAVE INFO RE-STYLE */.fav-slide-block .fav-slide .btn-fav .link .title {color: #1d439b;text-shadow: none !important; font-family: Verdana,Arial; font-size: 11px !important; padding: 0;}.fav-slide-block .fav-slide .btn-fav .link .users {opacity: ${hide};color: #787878 !important; text-shadow: none; font-family: Verdana,Arial; font-size: 11px; line-height: 15px; }.fav-slide-block .fav-slide .btn-fav .link .title {width: 150px;position: relative; background: transparent; margin-left: 45px; }.fav-slide-block .fav-slide .btn-fav .link .users {width: 150px;position: relative; background: transparent; margin-left: 40px; margin-top: 4px; }.fav-slide-block .fav-slide .btn-fav .link img {position: absolute !important; background: transparent; left: 0px;top: 0px;}.fav-slide-block .fav-slide .btn-fav {padding-top: 4px !important; }.fav-slide-block .fav-slide .btn-fav .link .title:hover {text-decoration: underline; }/* UPDATE REPAIRS */.fav-slide-block .fav-slide .btn-fav .link .title {opacity: 1;}.fav-slide-block .fav-slide .btn-fav .link .title {color: #1d439b;top: 0px;text-shadow: none !important; font-size: 11px; left: 0px;font-family: Verdana,Arial; font-size: 11px !important; overflow: hidden; width: 150px !important; ;overflow: hidden; }/* UPDATE REPAIRS FOR COMPANIES */h5:nth-child(3){width: 100px;}#company_favorites {height: auto !important; width: 198px;position: ${CompaniesPosition}; scrollbar-width: thin; padding-left: 2px; float: left;}#company_favorites:hover {overflow-y: auto; }#company_favorites .fav-slide-outer .link {align-items: center; -webkit-box-align: center; display: -webkit-box; display: -ms-flexbox; display: flex;-ms-flex-align: center; width: 150px; margin-bottom: -17px;}#company_favorites .link .title {top: -30px;}.container-right > h5:nth-child(6) {border-bottom: 0 !important; }.container-right > h5:nth-child(8) {border-bottom: 0 !important; }.favmore > h5:nth-child(1) {border-bottom: 0 !important; }/* FAVORITES HEIGHT Change auto to the new px amount, 1500px is the default for 10 faves.*/.fav-slide-block .fav-slide-outer {height: auto !important; padding-bottom: 10px; }</style>`); //Original Favorites Styles By Shishio-kun (styles 221397, 221276)
  } //Finishes the if condition

  if (GM_getValue("Choice").match(/3|5/) !== null) { //If the user chose option 3 or 5
    document.head.insertAdjacentHTML('beforeend', `<style>.fav-slide-block .fav-slide {display: table-cell; width: 100px !important; }.fav-slide-block .fav-slide .btn-fav {padding-bottom: 10px !important; }.fav-slide-block .fav-slide-outer {height: auto;width: 200px !important; height: important; }.fav-slide-block .fav-slide .btn-fav .link img {background-color: transparent; }#anime_favorites {height: auto !important; width: 198px;position: relative !important; position: relative; float: left;}#anime_favorites:hover {overflow-y: auto; }div#manga_favorites.fav-slide-block.mb12 {height: auto !important; width: 198px;position: relative !important; scrollbar-width: thin; padding-left: 2px; position: relative; float: left;}div#manga_favorites.fav-slide-block.mb12:hover {overflow-y: auto; }#character_favorites {height: auto !important; width: 198px;position: relative !important; scrollbar-width: thin; padding-left: 2px; position: relative; float: left;}#character_favorites:hover {overflow-y: auto; }#person_favorites {height: auto !important; width: 198px;position: relative !important; scrollbar-width: thin; padding-left: 2px; position: relative; float: left;}#person_favorites:hover {overflow-y: auto; }.fav-slide-block .fav-slide {position: relative; }.favmore{display: block !important; }.container-right > h5:nth-child(6) {position: absolute; left: 450px;margin-top: -25px !important; }.favmore > h5:nth-child(1) {position: absolute; left: 850px;margin-top: -25px !important; }.container-right > h5:nth-child(8) {position: absolute; left: 650px;margin-top: -25px !important; }.btn-favmore.open, .btn-favmore,.fav-slide-block .btn-fav-slide-side {opacity: 0 !important; pointer-events: none; }.page-common .content-container .pt24 {position: relative; float: left;top: -60px;}.fav-slide-block .lazyloaded {width: 40px;height: 60px;}.fav-slide-block .lazyloaded {width: 90px;height: 140px;image-rendering: inherit; image-rendering: -webkit-optimize-contrast; }.fav-slide-block .fav-slide .btn-fav .link {height: 130px;}/* CLASSIC FAVE INFO RE-STYLE */.fav-slide-block .fav-slide .btn-fav .link .title {color: #1d439b;text-shadow: none !important; font-family: Verdana,Arial; font-size: 11px !important; padding: 0;}.fav-slide-block .fav-slide .btn-fav .link .users {opacity: ${hide};color: #787878 !important; text-shadow: none; font-family: Verdana,Arial; font-size: 11px; }.fav-slide-block .fav-slide .btn-fav .link .title {width: 115px;position: relative; background: transparent; margin-left: 94px; }.fav-slide-block .fav-slide .btn-fav .link .users {width: 126px;position: relative; background: transparent; margin-left: 90px; margin-top: 4px; }.fav-slide-block .fav-slide .btn-fav .link img {position: absolute !important; background: transparent; left: 0px;top: 0px;}.fav-slide-block .fav-slide .btn-fav {padding-top: 4px !important; }.fav-slide-block .fav-slide .btn-fav .link .title:hover {text-decoration: underline; }/* BIG RE-STYLE FOR CLASSIC */.fav-slide-block .lazyloaded {width: 90px;height: 140px;}.fav-slide-block .fav-slide .btn-fav .link {height: 130px !important; }.fav-slide-block .fav-slide .btn-fav .link .title {width: 105px !important; margin-left: 94px; }.fav-slide-block .fav-slide .btn-fav .link .users {width: 110px;margin-left: 89px; margin-top: 4px; line-height: 15px; }/* UPDATE REPAIRS */.fav-slide-block .fav-slide .btn-fav .link .title {opacity: 1;}.fav-slide-block .fav-slide .btn-fav .link .title {color: #1d439b;top: 0px;text-shadow: none !important; font-size: 11px; left: 0px;font-family: Verdana,Arial; font-size: 11px !important; width: 110px;background: transparent; overflow: hidden; }/* UPDATE REPAIRS FOR COMPANIES */h5:nth-child(3){width: 100px;}#company_favorites {height: auto !important; width: 198px;position: ${CompaniesPosition}; scrollbar-width: thin; padding-left: 2px; float: left;}#company_favorites:hover {overflow-y: auto; }#company_favorites .fav-slide-outer .link {align-items: center; -webkit-box-align: center; display: -webkit-box; display: -ms-flexbox; display: flex;-ms-flex-align: center; width: 150px; margin-bottom: -17px;}#company_favorites .link .title {top: -30px;}.container-right > h5:nth-child(6) {border-bottom: 0 !important; }.container-right > h5:nth-child(8) {border-bottom: 0 !important; }.favmore > h5:nth-child(1) {border-bottom: 0 !important; }/* FAVORITES HEIGHT Change auto to the new px amount, 1500px is the default for 10 faves.*/.fav-slide-block .fav-slide-outer {height: auto !important; padding-bottom: 10px; }</style>`); //Original Favorites Styles with bigger pics By Shishio-kun (styles 221398, 221277)
  } //Finishes the if condition
})();