// ==UserScript== // @name Eolymp+ // @name:mk Eolymp+ // @namespace - // @version 3 // @description Enhances Eolymp, a Ukrainian website for coding // @description:mk Ја збогатува Eolymp, украинска веб-страна за кодирање // @author Plantt // @match *://www.eolymp.com/* // @match *://eolymp.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=eolymp.com // @grant none // @license CC-BY-ND // @downloadURL none // ==/UserScript== addEventListener("load", () => { console.log("%c[Eolymp+] %cLoading %cEolymp+", "color:darkgray;font-style:italic", "", "color:#2b9ca0;text-decoration:underline"); window.updatePage = updatePage; function updatePage() { if (!document.getElementById("pref-css")) { var customCSS = document.createElement("style"); customCSS.id = "pref-css"; document.head.appendChild(customCSS); } document.getElementById("pref-css").innerHTML = localStorage.getItem("pref-css"); if (localStorage.getItem("pref-hide_fund_banner") == "true") { document.querySelector("body > main > div.eo-container > div.eo-top-banner").style.display = "none"; } else { document.querySelector("body > main > div.eo-container > div.eo-top-banner").style.display = ""; } document.querySelector("body > main > div.ribbon").style.background = document.querySelector("body > main > div.eo-container > div.eo-top-banner").style.background = `hsl(${localStorage.getItem("pref-hue") || 182}deg 58% 40%)`; document.querySelector("body > header").style.background = `hsl(${localStorage.getItem("pref-hue") || 182}deg 58% 35%)`; document.querySelectorAll(".eo-header__link_darker").forEach(elm => void(elm.style.color = `hsl(${localStorage.getItem("pref-hue") || 182}deg 58% 21%)`)); document.querySelector("body > header > nav:nth-child(4) > a:nth-child(7) > svg").setAttribute("fill", `hsl(${localStorage.getItem("pref-hue") || 182}deg 58% 21%)`); console.log("%c[Eolymp+] %cUpdated page", "color:darkgray;font-style:italic", ""); document.querySelector("body > footer > div.eo-footer__copy").innerHTML = `© Eolymp ${new Date().getFullYear()} (Eolymp+ by EntityPlantt)`; } updatePage(); if (/^https?:\/\/www\.eolymp\.com\/..\/settings\/preferences/.test(document.URL)) { var custPref = document.createElement("fieldset"); custPref.innerHTML = `