Skip to content

Commit

Permalink
feat: replace favicon too
Browse files Browse the repository at this point in the history
  • Loading branch information
Sv443 committed Aug 2, 2023
1 parent df6a5c7 commit 8f23acf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
12 changes: 9 additions & 3 deletions dist/BetterYTM.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/features/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,17 @@ ytmusic-logo a.bytm-logo-exchanged .bytm-mod-logo-img {
}

@keyframes rotate-fade-in {
from {
0% {
opacity: 0;
transform: rotate(0deg);
}
30% {
opacity: 0;
}
90% {
opacity: 1;
}
to {
100% {
transform: rotate(360deg);
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/features/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ function exchangeLogo() {

logoElem.insertBefore(newLogo, logoElem.querySelector("svg"));

document.head.querySelectorAll<HTMLLinkElement>("link[rel=\"icon\"]").forEach(e => {
e.href = getAssetUrl("icon/icon.png");
});

setTimeout(() => {
logoElem.querySelectorAll(".bytm-mod-logo-ellipse").forEach(e => e.remove());
}, 1000);
Expand Down

0 comments on commit 8f23acf

Please sign in to comment.