File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11<template >
2- <button class =" btn btn-primary" v-on:click =" exportarHorario()" >
2+ <button class =" btn btn-primary" v-on:click =" exportarHorario()" v-bind:disabled = " !this.tableTurmas " >
33 Exportar Horário
44 <span class =" glyphicon glyphicon-circle-arrow-down" ></span >
55 </button >
@@ -29,14 +29,14 @@ const getFimPeriodo = () => {
2929 const { periodo , ano } = ufcg .hoje
3030 const date = new Date ()
3131 date .setFullYear (ano)
32- date .setDate (' 15' ) // because
33- date .setMonth (periodo == ' 1' ? 5 : 12 )
32+ date .setDate (' 15' ) // just because
33+ date .setMonth (periodo == ' 1' ? 5 : 11 )
3434 return date
3535}
3636
3737const getTableTurmas = async () => {
3838 const doc = await ufcg .getPaginaHorario ()
39- return doc .querySelectorAll (' table' )[0 ]
39+ return doc && doc .querySelectorAll (' table' )[0 ]
4040}
4141
4242const getNomeDisciplina = tr => {
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ export default {
119119 this .horario = ufcg .professor ? null : horario .innerHTML
120120 this .tableTurmas = turmas
121121 this .calcularAulaAtual ()
122+ this .temTurmas = true
122123 })
123124
124125 setInterval (() => {
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ const config = {
1414 util : './util.js' ,
1515 background : './background.js' ,
1616 'popup/popup' : './popup/popup.js' ,
17- home : './home.js' ,
1817 'injectors/frequencia' : './injectors/frequencia.js' ,
1918 'injectors/notas' : './injectors/notas.js' ,
2019 'injectors/historico' : './injectors/historico.js' ,
You can’t perform that action at this time.
0 commit comments