// ==UserScript== // @name ANLogoS (AniList Dynamic Colored Logos) // @namespace http://tampermonkey.net/ // @website https://animetopbtns.github.io/website/ANLogoS/ // @version 1.0 // @description Changes the color of the AniList logo to match profile themes // @author WhiteTapeti // @match *://*.anilist.co/* // @icon https://github.com/animeTopBtns/AniList-dynamic-colored-Logo/blob/main/logox128.gif?raw=true // @license MIT // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js // @downloadURL https://update.greasyfork.cloud/scripts/456970/ANLogoS%20%28AniList%20Dynamic%20Colored%20Logos%29.user.js // @updateURL https://update.greasyfork.cloud/scripts/456970/ANLogoS%20%28AniList%20Dynamic%20Colored%20Logos%29.meta.js // ==/UserScript== var ANLogoS = ` ` $("body").append( function ChangeEvC() { if (window.location.href.indexOf('https://anilist.co/user/') == 0) { $(document).ready(function () { if ($("img[data-v-62eacfff]").length == true) { $('img[data-v-62eacfff]').replaceWith(ANLogoS) $('.ANLogoS-1').css({ fill: 'rgb(' + $('.user-page-unscoped').css('--color-blue') + ')', }); return; } }); } $(document).ready(function () { $('img[data-v-62eacfff]').replaceWith(ANLogoS) console.log("d1"); $(document).click(function () { console.log("d2-1"); if (window.location.href.indexOf('https://anilist.co/user/') == 0) { $(".content .container").ready(function () { console.log("d2-2"); $('.ANLogoS-1').css({ fill: 'rgb(' + $('.user-page-unscoped').css('--color-blue') + ')', }); }); } else if (window.location.href.indexOf('https://anilist.co/') == 0) { console.log("d1-2"); $('.ANLogoS-1').css({ fill: '#3db4f2', }); } }); }); window.addEventListener('popstate', (event) => { if (window.location.href.indexOf('https://anilist.co/user/') == 0) { $(".content .container").ready(function () { console.log("d2-2"); $('.ANLogoS-1').css({ fill: 'rgb(' + $('.user-page-unscoped').css('--color-blue') + ')', }); }); } else if (window.location.href.indexOf('https://anilist.co/') == 0) { console.log("d1-2"); $('.ANLogoS-1').css({ fill: '#3db4f2', }); } }); } );