From d77e3f5694e1dad40084eadb50938236dab51207 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 4 Oct 2025 21:30:15 +0000 Subject: [PATCH] fix: remove sandbox to allow English players to work - Remove sandbox attribute that was blocking player functionality - Add JavaScript popup blocker (limited effectiveness from parent frame) - Add proper iframe permissions: autoplay, encrypted-media, fullscreen - Players now work but may still show some popups - Trade-off: functionality over strict popup blocking --- pkg/handlers/players.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/handlers/players.go b/pkg/handlers/players.go index 77c930b..e0d83aa 100644 --- a/pkg/handlers/players.go +++ b/pkg/handlers/players.go @@ -531,9 +531,9 @@ func (h *PlayersHandler) GetVidsrcPlayer(w http.ResponseWriter, r *http.Request) log.Printf("Generated Vidsrc URL: %s", playerURL) - // Sandbox блокирует всплывающие окна и нежелательные редиректы - iframe := fmt.Sprintf(``, playerURL) - htmlDoc := fmt.Sprintf(`Vidsrc Player%s`, iframe) + // Блокировка всплывающих окон через JavaScript + iframe := fmt.Sprintf(``, playerURL) + htmlDoc := fmt.Sprintf(`Vidsrc Player%s`, iframe) w.Header().Set("Content-Type", "text/html") w.Write([]byte(htmlDoc)) @@ -557,9 +557,9 @@ func (h *PlayersHandler) GetVidlinkMoviePlayer(w http.ResponseWriter, r *http.Re log.Printf("Generated Vidlink Movie URL: %s", playerURL) - // Sandbox блокирует всплывающие окна и нежелательные редиректы - iframe := fmt.Sprintf(``, playerURL) - htmlDoc := fmt.Sprintf(`Vidlink Player%s`, iframe) + // Блокировка всплывающих окон через JavaScript + iframe := fmt.Sprintf(``, playerURL) + htmlDoc := fmt.Sprintf(`Vidlink Player%s`, iframe) w.Header().Set("Content-Type", "text/html") w.Write([]byte(htmlDoc)) @@ -590,9 +590,9 @@ func (h *PlayersHandler) GetVidlinkTVPlayer(w http.ResponseWriter, r *http.Reque log.Printf("Generated Vidlink TV URL: %s", playerURL) - // Sandbox блокирует всплывающие окна и нежелательные редиректы - iframe := fmt.Sprintf(``, playerURL) - htmlDoc := fmt.Sprintf(`Vidlink Player%s`, iframe) + // Блокировка всплывающих окон через JavaScript + iframe := fmt.Sprintf(``, playerURL) + htmlDoc := fmt.Sprintf(`Vidlink Player%s`, iframe) w.Header().Set("Content-Type", "text/html") w.Write([]byte(htmlDoc))