Skip to content

Instantly share code, notes, and snippets.

@PoomSmart
Last active February 17, 2018 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PoomSmart/770a6711a086371fb71eec4c6ea0d512 to your computer and use it in GitHub Desktop.
Save PoomSmart/770a6711a086371fb71eec4c6ea0d512 to your computer and use it in GitHub Desktop.
Show only active courses in ICT eLearning website.
$(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