Widget:InitPageMerchantScript: mudanças entre as edições

sem sumário de edição
Sem resumo de edição
Sem resumo de edição
 
(4 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 2: Linha 2:
document.addEventListener('DOMContentLoaded', function () {   
document.addEventListener('DOMContentLoaded', function () {   
   const url = window.location.origin;
   const url = window.location.origin;
   const weekDay = new Date().getWeekNumber();
   const date = new Date();
  const updateTime = 7 * 60 + 40;
   const merchantCard = document.getElementById('merchant-card');
   const merchantCard = document.getElementById('merchant-card');
  if((date.getHours()*60+date.getMinutes()) < updateTime) date.setDate(date.getDate() - 1);
  const weekDay = date.getDay();


   // Indice 0 == Domingo -> Indice 6 == Sábado
   // Indice 0 == Domingo -> Indice 6 == Sábado