Feature/#1 requests page own requests colored border #5

Merged
Serraniel merged 2 commits from feature/#1-requests-page-own-requests-colored-border into develop 2020-04-25 23:23:56 +02:00
Showing only changes of commit 604db7a723 - Show all commits

View file

@ -1,6 +1,7 @@
const starIcon = "star";
executeAfterPreload(changeFollowedStarColor);
executeAfterPreload(changeOwnBorderColor);
function changeFollowedStarColor() {
// find stars
@ -8,4 +9,18 @@ function changeFollowedStarColor() {
// change color
followedItems.forEach(item => item.style.color = aniBlue);
}
function changeOwnBorderColor() {
// find items -> all
let requestItems = document.querySelectorAll("md-list-item");
// change border color if profile link is not "false"
requestItems.forEach(item => {
let profileLink = item.querySelectorAll("a[href*='/profile/']:not([href='/profile/false'])");
if (profileLink.length > 0) {
item.style.borderColor = aniBlue
}
});
}