mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
25 lines
742 B
JavaScript
25 lines
742 B
JavaScript
(() =>
|
|
{
|
|
return (settings, resources) =>
|
|
{
|
|
(async () =>
|
|
{
|
|
const dropdown = await SpinQuery.select(() => document.querySelector(`input[key=defaultPlayerLayout]`));
|
|
if (!dropdown)
|
|
{
|
|
return;
|
|
}
|
|
const cookieKey = "stardustvideo";
|
|
const cookieValues = {
|
|
"旧版": 0,
|
|
"新版1": 1,
|
|
"新版2": 2,
|
|
};
|
|
dropdown.addEventListener("change", () =>
|
|
{
|
|
document.cookie = `${cookieKey}${cookieValues[dropdown.value]};path=/;domain=.bilibili.com;max-age=31536000`;
|
|
window.location.reload();
|
|
});
|
|
})();
|
|
};
|
|
})(); |