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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user