fix(content): make size smaller

This commit is contained in:
StroepWafel committed 2026-06-26 21:21:25 +09:30
1 parent 13f974d652
commit 06be15b0ef
4 files changed
+12 -21

No files matched your search

+7 -7
View File
@@ -4993,7 +4993,7 @@ h2.home-subtitle {
position: fixed;
right: 24px;
bottom: 24px;
width: min(420px, calc(100vw - 48px));
width: min(640px, calc(100vw - 48px));
aspect-ratio: 16 / 9;
border-radius: 16px;
overflow: hidden;
@@ -5015,11 +5015,11 @@ h2.home-subtitle {
.bsplus-ld-surprise-close {
position: absolute;
top: 8px;
right: 8px;
top: 10px;
right: 10px;
z-index: 1;
width: 32px;
height: 32px;
width: 36px;
height: 36px;
padding: 0;
border: 0;
border-radius: 999px;
@@ -5031,7 +5031,7 @@ h2.home-subtitle {
.bsplus-ld-surprise-close::before {
content: "\ed8a";
font-family: "IconFamily";
font-size: 18px;
font-size: 20px;
line-height: 1;
pointer-events: none;
}
@@ -5059,7 +5059,7 @@ h2.home-subtitle {
.bsplus-ld-surprise-play::before {
content: "\ec5d";
font-family: "IconFamily";
font-size: 3rem;
font-size: 4rem;
line-height: 1;
pointer-events: none;
filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
+1 -2
View File
@@ -36,8 +36,7 @@
"resources/icons/*",
"resources/update-image.webp",
"resources/pdfjs/pdf.worker.min.mjs",
"resources/pdfjs/pdf.legacy.min.mjs",
"resources/theme-toggle-surprise.mp4"
"resources/pdfjs/pdf.legacy.min.mjs"
],
"matches": ["*://*/*"]
}
Binary file not shown.
@@ -1,7 +1,8 @@
import browser from "webextension-polyfill";
import themeToggleSurpriseVideo from "@/resources/theme-toggle-surprise.mp4";
/** Maintainer note: the light/dark toggle easter egg (10 clicks) plays a Rick Roll video. */
const VIDEO_RESOURCE = "resources/theme-toggle-surprise.mp4";
const VIDEO_SRC = browser.runtime.getURL(themeToggleSurpriseVideo);
const POPOUT_ROOT_ID = "bsplus-ld-surprise-root";
/** Preload begins this many toggle clicks before the reveal. */
export const THEME_TOGGLE_SURPRISE_PRELOAD_AT = 5;
@@ -10,7 +11,6 @@ export const THEME_TOGGLE_SURPRISE_TRIGGER_AT = 10;
let playerRoot: HTMLElement | null = null;
let playerVideo: HTMLVideoElement | null = null;
let playerPlayOverlay: HTMLButtonElement | null = null;
let videoSourceUrl: string | null = null;
function hostElement(): HTMLElement {
return document.getElementById("container") ?? document.body;
@@ -24,18 +24,10 @@ function showPlayOverlay(): void {
playerPlayOverlay?.classList.remove("bsplus-ld-surprise-play--hidden");
}
function videoResourceUrl(): string {
if (!videoSourceUrl) {
videoSourceUrl = browser.runtime.getURL(VIDEO_RESOURCE);
}
return videoSourceUrl;
}
function attachVideoSource(): void {
if (!playerVideo) return;
const src = videoResourceUrl();
if (playerVideo.src === src) return;
playerVideo.src = src;
if (playerVideo.src === VIDEO_SRC) return;
playerVideo.src = VIDEO_SRC;
playerVideo.load();
}