This commit is contained in:
2026-03-31 08:40:53 -05:00
parent 1c3095de32
commit c3e32d4666
3 changed files with 104 additions and 96 deletions

Binary file not shown.

View File

@@ -253,16 +253,18 @@
} }
/* RX watch button states */ /* RX watch button states */
.hero-watch-btn.rx-rated {
transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), .hero-watch-btn.rx-rated {
background-color 0.15s ease; transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
} background-color 0.15s ease;
.hero-watch-btn.rx-rated:hover { }
cursor: not-allowed;
background-color: #c0392b; .hero-watch-btn.rx-rated:hover {
box-shadow: 0 10px 30px rgba(192, 57, 43, 0.5); cursor: not-allowed !important; /* The "no selection" cursor */
transform: translateY(-3px) scale(1.02); background-color: #ff9500;
} box-shadow: 0 10px 30px rgba(192, 57, 43, 0.5);
transform: translateY(-3px) scale(1.02);
}
.hero-action-btn { .hero-action-btn {
display: inline-flex; display: inline-flex;
@@ -1270,20 +1272,11 @@
<!-- RX Gate Modal --> <!-- RX Gate Modal -->
<div id="rx-gate-overlay" class="rx-gate-overlay"> <div id="rx-gate-overlay" class="rx-gate-overlay">
<div class="rx-gate-card"> <div class="rx-gate-card">
<span class="rx-gate-icon">🔞</span> <div class="rx-gate-badge">You know, I really thought you would do better</div>
<div class="rx-gate-badge">Rated Rx — Explicit Content</div>
<h2 class="rx-gate-title">Are you sure about this?</h2> <h2 class="rx-gate-title">Are you sure about this?</h2>
<p class="rx-gate-subtitle">
This series has been rated <strong>Rx</strong> and contains explicit adult content.
Are you absolutely certain you want to proceed?
</p>
<div class="rx-gate-actions"> <div class="rx-gate-actions">
<button class="rx-gate-btn-yes" id="rx-gate-yes">Yes, I'm sure</button> <button class="rx-gate-btn-yes" id="rx-gate-yes">Yes, I'm sure</button>
<button class="rx-gate-btn-no" id="rx-gate-no">No, take me back</button>
</div> </div>
<p class="rx-gate-disclaimer">
By continuing you confirm you are of legal age to view adult content in your region.
</p>
</div> </div>
</div> </div>
@@ -1818,89 +1811,103 @@
} }
function updateWatchButton(mode) { function updateWatchButton(mode) {
const btn = document.getElementById("hero-watch-btn"); const btn = document.getElementById("hero-watch-btn");
btn.style.display = "inline-flex"; btn.style.display = "inline-flex";
const hist = localWatchHistory[currentMalId] || {}; const hist = localWatchHistory[currentMalId] || {};
let lastEp = 0; let lastEp = 0;
Object.keys(hist).forEach((k) => { if (parseInt(k) > lastEp) lastEp = parseInt(k); }); Object.keys(hist).forEach((k) => { if (parseInt(k) > lastEp) lastEp = parseInt(k); });
if (mode === "Movie") { // Determine standard text
const hasWatched = lastEp === 1; let btnContent = "";
btn.innerHTML = hasWatched ? `<i class="fas fa-play"></i> Resume Movie` : `<i class="fas fa-film"></i> Watch Movie`; let targetEp = 1;
btn.onclick = (e) => handleWatchClick(e, 1);
} else {
let target = lastEp > 0 ? lastEp : 1;
if (hist[target]?.state === "finished") target++;
const exists = episodesData.find((e) => e.attributes.number === target);
if (!exists && lastEp > 0) {
target = 1;
btn.innerHTML = `<i class="fas fa-rotate-right"></i> Re-watch`;
} else {
btn.innerHTML = `<i class="fas fa-play"></i> ${lastEp > 0 ? "Continue" : "Start"} EP ${target}`;
}
btn.onclick = (e) => handleWatchClick(e, target);
}
// Apply/remove RX styling and hover behavior if (mode === "Movie") {
if (isRxRated) { targetEp = 1;
btn.classList.add("rx-rated"); const hasWatched = lastEp === 1;
attachRxHoverBehavior(btn); btnContent = hasWatched ? `<i class="fas fa-play"></i> Resume Movie` : `<i class="fas fa-film"></i> Watch Movie`;
} else { } else {
btn.classList.remove("rx-rated"); targetEp = lastEp > 0 ? lastEp : 1;
detachRxHoverBehavior(btn); if (hist[targetEp]?.state === "finished") targetEp++;
} const exists = episodesData.find((e) => e.attributes.number === targetEp);
}
if (!exists && lastEp > 0) {
targetEp = 1;
btnContent = `<i class="fas fa-rotate-right"></i> Re-watch`;
} else {
btnContent = `<i class="fas fa-play"></i> ${lastEp > 0 ? "Continue" : "Start"} EP ${targetEp}`;
}
}
// ---- RX watch button hover handlers ---- btn.innerHTML = btnContent;
function attachRxHoverBehavior(btn) { btn.onclick = (e) => handleWatchClick(e, targetEp);
// Avoid double-attaching
if (btn._rxHoverAttached) return;
btn._rxHoverAttached = true;
btn._rxMouseEnter = () => { // Apply RX logic if needed
// Save the current inner HTML so we can restore it on mouse leave if (isRxRated && !rxGateAccepted) {
btn._rxOriginalHTML = btn.innerHTML; btn.classList.add("rx-rated");
btn.innerHTML = `<i class="fas fa-ban"></i> Really... I'm Disappointed`; attachRxHoverBehavior(btn, btnContent);
}; } else {
btn._rxMouseLeave = () => { btn.classList.remove("rx-rated");
if (btn._rxOriginalHTML !== undefined) { detachRxHoverBehavior(btn);
btn.innerHTML = btn._rxOriginalHTML; }
} }
};
btn.addEventListener("mouseenter", btn._rxMouseEnter); function attachRxHoverBehavior(btn, originalHTML) {
btn.addEventListener("mouseleave", btn._rxMouseLeave); if (btn._rxHoverAttached) return;
} btn._rxHoverAttached = true;
btn._rxOriginalHTML = originalHTML;
function detachRxHoverBehavior(btn) { btn._rxMouseEnter = () => {
if (!btn._rxHoverAttached) return; // Only change text if they haven't accepted the gate yet
btn.removeEventListener("mouseenter", btn._rxMouseEnter); if (!rxGateAccepted) {
btn.removeEventListener("mouseleave", btn._rxMouseLeave); btn.innerHTML = `<i class="fas fa-ban"></i> Really... I'm Disappointed`;
btn._rxHoverAttached = false; }
} };
btn._rxMouseLeave = () => {
btn.innerHTML = btn._rxOriginalHTML;
};
// ---- Unified watch click handler ---- btn.addEventListener("mouseenter", btn._rxMouseEnter);
function handleWatchClick(e, ep) { btn.addEventListener("mouseleave", btn._rxMouseLeave);
if (isRxRated && !rxGateAccepted) { }
// Shift+click silently bypasses the gate — no mention of this anywhere
if (e.shiftKey) { function handleWatchClick(e, ep) {
rxGateAccepted = true; // 1. SECRET BYPASS: Shift + Click
openPlayer(ep); if (e.shiftKey) {
return; console.log("Bypassing gate via shift-click...");
} rxGateAccepted = true;
showRxGate(); dismissRxGate();
// After user accepts the gate, clicking the button again will open the player detachRxHoverBehavior(document.getElementById("hero-watch-btn"));
// We re-wire the button's onclick after acceptance so the next click goes straight through openPlayer(ep);
const originalOnClick = document.getElementById("hero-watch-btn").onclick; return;
document.getElementById("rx-gate-yes").onclick = () => { }
rxGateAccepted = true;
dismissRxGate(); // 2. STANDARD RX GATE
openPlayer(ep); if (isRxRated && !rxGateAccepted) {
}; showRxGate();
return;
} // Wire up the modal's "Yes" button to actually open the player
openPlayer(ep); document.getElementById("rx-gate-yes").onclick = () => {
} rxGateAccepted = true;
dismissRxGate();
// Remove the "disappointed" hover effect now that they've admitted it
detachRxHoverBehavior(document.getElementById("hero-watch-btn"));
openPlayer(ep);
};
return;
}
// 3. NORMAL PLAY
openPlayer(ep);
}
function detachRxHoverBehavior(btn) {
if (!btn || !btn._rxHoverAttached) return;
btn.removeEventListener("mouseenter", btn._rxMouseEnter);
btn.removeEventListener("mouseleave", btn._rxMouseLeave);
btn.classList.remove("rx-rated");
btn._rxHoverAttached = false;
}
function openPlayer(ep) { function openPlayer(ep) {
const url = `view.html?id=${currentMalId}&ep=${ep}`; const url = `view.html?id=${currentMalId}&ep=${ep}`;

View File

@@ -0,0 +1 @@
{"payload": {"entries": [{"anilist_id": 113417, "mal_id": 40746, "title_romaji": "Overflow", "title_english": "Overflow", "title_native": "\u304a\u30fc\u3070\u30fc\u3075\u308d\u3049", "format": "ONA", "start_date": {"year": 2020, "month": 1, "day": 6}, "season": "WINTER", "season_year": 2020, "episodes": 8, "relation_type_from_parent": null, "inferred_part": null, "is_season": false, "is_final_from_title": false, "title_display": "Overflow", "_start_tuple": [2020, 1, 6], "is_final_season": false}], "season_groups": [], "extras": [{"title": "Overflow", "mal_id": 40746, "anilist_id": 113417, "format": "ONA", "start_date": {"year": 2020, "month": 1, "day": 6}}]}, "_timestamp": 1774963942.841442}