<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Danh sách tập phim</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin: 20px;
}
/* Khung player */
#player {
width: 100%;
max-width: 700px;
height: 400px;
margin: 0 auto 30px auto;
display: flex;
align-items: center;
justify-content: center;
background: url("https://i.ytimg.com/vi/fvuV90aQMys/maxresdefault.jpg") center/cover no-repeat;
border-radius: 10px;
}
#player.hidden {
background: url("https://i.ytimg.com/vi/fvuV90aQMys/maxresdefault.jpg") center/cover no-repeat;
}
#episodes {
max-width: 800px;
margin: auto;
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
}
#episodes a {
text-decoration: none;
padding: 8px 12px;
background-color: #007bff;
color: white;
border-radius: 5px;
transition: 0.3s;
display: inline-block;
cursor: pointer;
}
#episodes a:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<h2>Danh sách tập phim</h2>
<!-- KHUNG PLAYER (mặc định có background) -->
<div id="player" class="hidden">
<span style="background: rgba(0,0,0,0.5); color:white; padding:10px; border-radius:5px;">
Chọn một tập để bắt đầu xem
</span>
</div>
<div id="episodes"></div>
<script>
document.addEventListener("DOMContentLoaded", function () {
let container = document.getElementById("episodes");
let playerBox = document.getElementById("player");
// Danh sách mã short.icu
const codes = {
1: "riFaDb7yE",
2: "pK5DCZS3P",
3: "hBEVlp1af",
4: "1k2gSXSNm",
5: "pI_fsLiPC",
6: "FKl4jI08l",
7: "tTJuYW2WE",
8: "O3JMtP_xn",
9: "T9GNaMFnXp",
10: "UHNMaSq1r",
11: "oAyiC-huP",
12: "CLDXYKMZW",
13: "XXvNnla6L",
14: "CPl6lNo9_",
15: "qsbLIpGc4",
16: "bHsK6JnYz",
17: "cq8wSd6h2",
18: "SEH6mRR4o",
19: "TKE6RXl7E",
20: "S8aCCYvbT",
// ...
// 40: "xxxxxxx40"
};
for (let i = 1; i <= 20; i++) {
let paddedIndex = String(i).padStart(2, '0');
let btn = document.createElement("a");
btn.innerText = `TẬP ${paddedIndex}`;
btn.href = "javascript:void(0);";
btn.onclick = function () {
let code = codes[i];
if (!code) {
alert("Chưa thêm mã short.icu cho tập này!");
return;
}
// Xóa background khi bắt đầu xem
playerBox.style.background = "none";
playerBox.innerHTML = `
<iframe width="100%" height="400"
src="https://short.icu/${code}"
frameborder="0"
scrolling="0"
allowfullscreen>
</iframe>
`;
};
container.appendChild(btn);
}
});
</script>
</body>
</html>
2026-03-24