mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
18 lines
612 B
JavaScript
18 lines
612 B
JavaScript
function favoritesRedirect() {
|
|
const videoLinks = document.querySelectorAll("li[data-aid]>a");
|
|
videoLinks.forEach(link => {
|
|
const href = link.getAttribute("href");
|
|
if (href === null || !href.includes("medialist")) {
|
|
return;
|
|
}
|
|
const aid = link.parentElement.getAttribute("data-aid");
|
|
link.setAttribute("href", `https://www.bilibili.com/video/av${aid}`);
|
|
});
|
|
}
|
|
(async () => {
|
|
const spaceApp = await SpinQuery.select("#app>.s-space");
|
|
if (spaceApp !== null) {
|
|
Observer.childListSubtree("#app>.s-space", favoritesRedirect);
|
|
}
|
|
})();
|