* fix: migrate remaining eslint-config-edx * refactor: updated eslint rules according to eslint-config-edx-es5 * refactor: add custom rules to suppress unnecessary eslint issues * refactor: add custom rules to internal eslint configs * fix: fix all indentation issues * chore: update lock file
24 lines
662 B
JavaScript
24 lines
662 B
JavaScript
(function(define) {
|
|
'use strict';
|
|
|
|
define([
|
|
'jquery',
|
|
'logger'
|
|
],
|
|
function($, Logger) {
|
|
return function() {
|
|
// This function performs all actions common to all courseware.
|
|
// 1. adding an event to all link clicks.
|
|
$('a:not([href^="#"])').click(function(event) {
|
|
Logger.log(
|
|
'edx.ui.lms.link_clicked',
|
|
{
|
|
current_url: window.location.href,
|
|
target_url: event.currentTarget.href
|
|
});
|
|
});
|
|
};
|
|
}
|
|
);
|
|
}).call(this, define || RequireJS.define);
|