Merge pull request #4 from Serraniel/feature/#1-requests-page-followed-requests-colored-star
#1 Change star color to primary color when a request is followed
This commit is contained in:
commit
df5240e17d
11
enhancements/animeRequests.js
Normal file
11
enhancements/animeRequests.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
const starIcon = "star";
|
||||
|
||||
executeAfterPreload(changeFollowedStarColor);
|
||||
|
||||
function changeFollowedStarColor() {
|
||||
// find stars
|
||||
let followedItems = Array.from(document.querySelectorAll("i")).filter(i => i.innerText == starIcon);
|
||||
|
||||
// change color
|
||||
followedItems.forEach(item => item.style.color = aniBlue);
|
||||
}
|
|
@ -15,6 +15,15 @@
|
|||
"utils/aniwatchCore.js"
|
||||
],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
"*://aniwatch.me/requests"
|
||||
],
|
||||
"js": [
|
||||
"enhancements/animeRequests.js"
|
||||
],
|
||||
"run_at": "document_end"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue