Bilibili-Evolved/utils/remove-promotions/remove-promotions.js

20 lines
524 B
JavaScript

(() =>
{
return (_, resources) =>
{
SpinQuery.any(
() => $(".gg-pic").parent("a"),
it =>
{
it.css("display", "none");
it.each((_, element) =>
{
const index = $(element).index() + 1;
const selector = $(element).parent().parent().find(`.pic li:nth-child(${index})`);
$(selector).css("visibility", "hidden");
});
}
);
};
})();