Last active
February 17, 2018 10:07
-
-
Save PoomSmart/770a6711a086371fb71eec4c6ea0d512 to your computer and use it in GitHub Desktop.
Show only active courses in ICT eLearning website.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
if (top.location.hostname === 'elearning.ict.mahidol.ac.th') { | |
var activeCourses = [ "ITCS343", "ITCS381", "ITCS323", "ITCS335", "ITLG202", "ITCS241", "ITID274" ]; // for example | |
var courses = $(".block_course_list > .content > .list").children(); | |
$.each(courses, function() { | |
var title = $(this).text().split(" - ")[0]; | |
if ($.inArray(title, activeCourses) == -1) | |
$(this).hide(); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment