From 195700ea69227e0faa93da027fd12d91d54a1511 Mon Sep 17 00:00:00 2001 From: demetrios-koziris Date: Sat, 17 Dec 2016 10:14:13 -0500 Subject: [PATCH] remove now redundant sidebar section for related courses by department or by prof --- src/js/addSidebar.js | 43 ++----------------------------------------- src/manifest.json | 2 +- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/src/js/addSidebar.js b/src/js/addSidebar.js index 2d9818b..1915616 100644 --- a/src/js/addSidebar.js +++ b/src/js/addSidebar.js @@ -184,46 +184,7 @@ function makeSidebarContent() { } - - //SIDEBAR RELATED COURSES AND RELATED PROGRAMS BLOCKS - - const sidebarRelatedBlock = generateSidebarBlock("Related Courses"); - sidebar.appendChild(sidebarRelatedBlock); - - if (deps.length > 0) { - - const deptCourses = generateRelatedCoursesSection("View Related Courses by Subject"); - sidebarRelatedBlock.appendChild(deptCourses); - - for (let d = 0; d 0) { - - const profCourses = generateRelatedCoursesSection("View Related Courses by Professor"); - sidebarRelatedBlock.appendChild(profCourses); - - for (let p = 0; p < profKeys.length; p++) { - const profFullName = profs[profKeys[p]].fullName; - const profURLName = profFullName.replace(/\ /g, " ").replace(/\&\#8209/g, "-"); - - const profCoursesURL = "https://www.mcgill.ca/study/" + urlYears + "/courses/search" + (isNewStyle ? "?search_api_views_fulltext=" : "/") + profURLName; - const profCoursesLinkDiv = document.createElement('div'); - profCoursesLinkDiv.className = (p === profKeys.length-1 ? "views-row views-row-last" : "views-row"); - profCoursesLinkDiv.appendChild(generateRelatedCoursesLink(profCoursesURL, profFullName)); - profCourses.appendChild(profCoursesLinkDiv); - } - } - - + // related programs section if (document.getElementsByClassName("view-catalog-program").length > 0) { const sidebarRelatedBlock = generateSidebarBlock("Related Programs"); @@ -234,7 +195,7 @@ function makeSidebarContent() { sidebarRelatedBlock.appendChild(relatedPrograms); } - //insert enhanced sidebar + // insert enhanced sidebar const container = document.getElementById(isNewStyle ? "inner-container" : "container"); if (document.getElementById(isNewStyle ? "sidebar-column" : "right-sidebar")) { document.createElement("div").appendChild(document.getElementById(isNewStyle ? "sidebar-column" : "right-sidebar")); diff --git a/src/manifest.json b/src/manifest.json index bf83efb..70399a0 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "McGill Enhanced", "author": "Demetrios Koziris", "manifest_version": 2, - "version": "3.0.9", + "version": "3.0.10", "description": "Enhance the functionality of McGill.ca", "permissions" : [ "declarativeContent",