From f4aebd4050a64bad0f7c361bd0782fe280a7ca4d Mon Sep 17 00:00:00 2001 From: sghsri Date: Sun, 17 Oct 2021 15:19:58 -0500 Subject: [PATCH] fixed departments --- js/background.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/js/background.js b/js/background.js index b30850f8..fec3d494 100644 --- a/js/background.js +++ b/js/background.js @@ -205,15 +205,9 @@ function getCurrentSemesters() { // use the utexas review api for getting the list of departments function getCurrentDepartments() { - $.get("https://www.utexasreview.com/api/get_major", function (response) { + $.get("https://raw.githubusercontent.com/sghsri/UT-Registration-Plus/master/docs/departments.json", function (response) { if (response) { - let { majors } = response; - let indices = Object.keys(majors); - let new_departments = []; - for (let i = 0; i < indices.length; i++) { - new_departments.push(majors[i].abr); - } - departments = new_departments; + departments = JSON.parse(response); } }); }