refactor: translate comments and improve code readability

Update comments from Chinese to English for better international collaboration
Standardize comment style across HTML, CSS and JavaScript files
Remove unnecessary comments about global variables
This commit is contained in:
2026-02-02 01:17:55 +08:00
parent c709429cd2
commit b3a5aa3446
3 changed files with 22 additions and 25 deletions

View File

@@ -1,4 +1,3 @@
// 全局变量
let videos = [
{
"id": 1,
@@ -476,7 +475,7 @@ let videos = [
];
let currentCategory = 'All';
// DOM 元素
// DOM elements
const searchInput = document.querySelector('.search-input');
const searchBtn = document.querySelector('.search-btn');
const searchResults = document.querySelector('.search-results');
@@ -505,13 +504,13 @@ function renderVideos() {
videoGrid.innerHTML = '';
shortsGrid.innerHTML = '';
// 渲染长视频
// Render long videos
videosOnly.forEach(video => {
const videoCard = createVideoCard(video);
videoGrid.appendChild(videoCard);
});
// 渲染短视频
// Render shorts videos
shortsOnly.forEach(video => {
const shortsCard = createShortsCard(video);
shortsGrid.appendChild(shortsCard);