Skip to content

Commit

Permalink
document duplicated page checks
Browse files Browse the repository at this point in the history
  • Loading branch information
toni-santos committed Oct 28, 2024
1 parent c13e436 commit a28ff69
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions content-scripts/modules/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const reverseDateDirection = () => {
};

export const currentAccountPage = () => {
// TODO: remove this check
if (getPath() != "gpag_ccorrente_geral.conta_corrente_view") return;

const contaCorrente = document.getElementById(
Expand Down
1 change: 1 addition & 0 deletions content-scripts/modules/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const improveSchedule = async () => {
const scheduleElem = document.querySelector("table.horario");

// Not on the schedule page, abort
// TODO: remove this check
if (!scheduleElem) return;

scheduleElem.classList.add("se-loading");
Expand Down
1 change: 1 addition & 0 deletions content-scripts/pages/class_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const groupClasses = async (enrolledTable) => {
};

export const classPage = () => {
// TODO: remove this check
const path = getPath();
if (!path.includes("it_listagem.lista_turma_disciplina")) return;

Expand Down
1 change: 1 addition & 0 deletions content-scripts/pages/components_page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Icon from "../components/Icon";
const components = ["Icon", "Button", "Table"];

export function createComponentsPage() {
// TODO: remove this check
if (!document.location.href.toLowerCase().includes("components")) {
return;
}
Expand Down
1 change: 1 addition & 0 deletions content-scripts/pages/course_unit_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from "../modules/utilities/pageUtils";

export const courseUnitPage = () => {
// TODO: remove this check
if (
!document.location.href
.toLowerCase()
Expand Down
1 change: 1 addition & 0 deletions content-scripts/pages/teacher_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const publicationWebsites = {
};

export const teacherPage = () => {
// TODO: remove this check
if (!document.location.href.toLowerCase().includes("func_geral.formview")) {
return;
}
Expand Down

0 comments on commit a28ff69

Please sign in to comment.