Skip to content

Instantly share code, notes, and snippets.

@bryanmenard
Created October 13, 2012 22:43
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 bryanmenard/3886465 to your computer and use it in GitHub Desktop.
Save bryanmenard/3886465 to your computer and use it in GitHub Desktop.
HEC ZoneCours 2 Improvements
// ==UserScript==
// @name HEC ZoneCours 2 Improvements
// @version 0.1
// @id hec-zc2-improvements
// @include https://zonecours2.hec.ca/portal*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @author Bryan Ménard
// ==/UserScript==
(function ($) {
var subs = {
'52-201-08': 'Finance I',
'52-401-02': 'Stratégie I',
'52-301-02': 'Ressources humaines',
'52-501-03': 'GOP'
}
$(document).ready(function () {
$('#siteLinkList li').each(function () {
var origText = $(this).text(),
title = $(this).find('a').attr('title'),
courseNumber = origText.split('.', 1)[0],
customTitle = subs[courseNumber];
if (!$(this).is(':first-child')) {
title = customTitle || title;
$(this).find('a span').text(title + ' - ' + courseNumber);
}
});
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment