MAL Custom CSS Override - Working!!!

Replaces the anime/manga lists CSS styles on other users anime/manga lists with your own, or with an style of an user of your choice!

2021-02-20 기준 버전입니다. 최신 버전을 확인하세요.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name        MAL Custom CSS Override - Working!!!
// @namespace   MALCSSOverRider
// @description Replaces the anime/manga lists CSS styles on other users anime/manga lists with your own, or with an style of an user of your choice!
// @version     1.0.0.0
// @match       https://myanimelist.net/animelist/*
// @match       https://myanimelist.net/mangalist/*
// @icon        https://www.google.com/s2/favicons?domain=myanimelist.net
// @grant       GM_registerMenuCommand
// @run-at      document-end
// @grant       unsafeWindow
// @grant       GM_setValue
// @grant       GM_getValue
// ==/UserScript==

var BackupedActualUserListStyle = document.querySelector("#custom-css").innerText; //Create a global variable to store the user actual list style css codes
var CurrentListUserName = window.location.pathname.split('/')[2]; //Get the username on the current list url to use later

if (GM_getValue("Default_Style") === undefined && CurrentListUserName === unsafeWindow.window.MAL.USER_NAME) { //if the default style doesn't exist yet define it if the user is on his own list
  GM_setValue("Default_Style", document.querySelector("#custom-css").innerText); //Store the actual style of the script user
  alert('The Default Style to be used to override the style on the lists of other users has been set!\nNow the lists of other users will use your anime/manga list css Style!'); //Show an alert message
} //Finishes the if condition

GM_registerMenuCommand("Use this List Style!", ChangeListStyle); //Adds an option to the menu

function ChangeListStyle() //Function to Change the List Style
{ //Starts the function ChangeListStyle
  GM_setValue("Default_Style", BackupedActualUserListStyle); //Store the actual style of the script user
  alert('The Default Style to be used to override the style on the lists of other users has been set!\nNow the lists of other users will have the Style that this user is using now!'); //Show an alert message
} //Finishes the function ChangeListStyle

document.querySelector("#custom-css").innerText = GM_getValue("Default_Style"); //Replaces the actual list style with the default list style that was chosen to be used to override styles