maralvic commited on
Commit
f770239
·
verified ·
1 Parent(s): e4293b3

O botão acessar YouTube deve estar no centro do modal em que está o video; inserir no link de acesso ao video, para que ele comece a tocar aos 30 segundos quando for redirecionado para o YouTube

Browse files
Files changed (1) hide show
  1. index.html +8 -7
index.html CHANGED
@@ -854,22 +854,23 @@
854
  timerDisplay.style.borderRadius = '5px';
855
  timerDisplay.style.display = 'none';
856
  document.querySelector('.modal-content').appendChild(timerDisplay);
857
-
858
  const redirectBtn = document.createElement('button');
859
  redirectBtn.textContent = 'Acessar YouTube';
860
  redirectBtn.style.position = 'absolute';
861
- redirectBtn.style.bottom = '20px';
862
- redirectBtn.style.right = '20px';
 
863
  redirectBtn.style.backgroundColor = '#ff0000';
864
  redirectBtn.style.color = 'white';
865
  redirectBtn.style.border = 'none';
866
- redirectBtn.style.padding = '10px 20px';
867
  redirectBtn.style.borderRadius = '5px';
868
  redirectBtn.style.cursor = 'pointer';
869
  redirectBtn.style.display = 'none';
 
 
870
  document.querySelector('.modal-content').appendChild(redirectBtn);
871
-
872
- let timerInterval;
873
  let currentVideoId = '';
874
 
875
  // Função para iniciar o timer
@@ -913,7 +914,7 @@
913
 
914
  // Redirecionar para YouTube
915
  redirectBtn.addEventListener('click', function() {
916
- window.open(`https://www.youtube.com/watch?v=${currentVideoId}`, '_blank');
917
  });
918
  // Pesquisar vídeos
919
  searchBox.addEventListener('input', function() {
 
854
  timerDisplay.style.borderRadius = '5px';
855
  timerDisplay.style.display = 'none';
856
  document.querySelector('.modal-content').appendChild(timerDisplay);
 
857
  const redirectBtn = document.createElement('button');
858
  redirectBtn.textContent = 'Acessar YouTube';
859
  redirectBtn.style.position = 'absolute';
860
+ redirectBtn.style.top = '50%';
861
+ redirectBtn.style.left = '50%';
862
+ redirectBtn.style.transform = 'translate(-50%, -50%)';
863
  redirectBtn.style.backgroundColor = '#ff0000';
864
  redirectBtn.style.color = 'white';
865
  redirectBtn.style.border = 'none';
866
+ redirectBtn.style.padding = '15px 30px';
867
  redirectBtn.style.borderRadius = '5px';
868
  redirectBtn.style.cursor = 'pointer';
869
  redirectBtn.style.display = 'none';
870
+ redirectBtn.style.fontSize = '1.2rem';
871
+ redirectBtn.style.zIndex = '1001';
872
  document.querySelector('.modal-content').appendChild(redirectBtn);
873
+ let timerInterval;
 
874
  let currentVideoId = '';
875
 
876
  // Função para iniciar o timer
 
914
 
915
  // Redirecionar para YouTube
916
  redirectBtn.addEventListener('click', function() {
917
+ window.open(`https://www.youtube.com/watch?v=${currentVideoId}&t=30s`, '_blank');
918
  });
919
  // Pesquisar vídeos
920
  searchBox.addEventListener('input', function() {