Last active
August 11, 2023 02:57
-
-
Save NuarkNoir/85ec1c0b18fc072b9ae962981bafe51f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Xuita | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description etot ebaniy script delaet kakuuto huinu i ochen neeffectivno, no mne pohui, ya ego napisal za 30 sekund, literaly dolshe seichas sizhu i pishoo etot ebaniy comentariy | |
// @author nuark | |
// @match https://abiturient.sfu-kras.ru/entrants-lists-rating* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=sfu-kras.ru | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const targetNode = document.body; | |
const config = { attributes: true, childList: true, subtree: true }; | |
const callback = (mutationList, observer) => { | |
for (const mutation of mutationList) { | |
if (mutation.type !== "childList") { | |
continue; | |
} | |
[...document.querySelectorAll(".EntrantsListsTable__entrant-row-item_enrollment")].forEach(e => { | |
if (e.textContent.includes("Резерв")) { | |
e.parentElement.style.backgroundColor = "maroon"; | |
e.parentElement.style.color = "white"; | |
} else if (e.textContent.includes("Рекомендован к зачислению (при подаче оригинала) по 1 приоритету") || e.textContent.includes("Рекомендован к зачислению (при подаче оригинала) по 2 приоритету") || e.textContent.includes("Рекомендован к зачислению (при подаче оригинала) по 3 приоритету")) { | |
e.parentElement.style.backgroundColor = "lime"; | |
} else if (e.textContent.includes("Рекомендован к зачислению по 1 приоритету")) { | |
e.parentElement.style.backgroundColor = "orange"; | |
} else if (e.textContent.includes("Рекомендован к зачислению")) { | |
e.parentElement.style.backgroundColor = "green"; | |
e.parentElement.style.color = "white"; | |
if (e.textContent.includes("при подаче оригинала")) { | |
e.parentElement.style.border = "red solid 5px"; | |
e.parentElement.style.borderLeft = ""; | |
e.parentElement.style.borderRight = ""; | |
} | |
} | |
}); | |
} | |
}; | |
const observer = new MutationObserver(callback); | |
observer.observe(targetNode, config); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment