Skip to content

Instantly share code, notes, and snippets.

@mfellner
Last active November 8, 2015 15:07
Show Gist options
  • Save mfellner/194b7d70b9d1a682cf37 to your computer and use it in GitHub Desktop.
Save mfellner/194b7d70b9d1a682cf37 to your computer and use it in GitHub Desktop.
Enumerate answer choices on edx.org
// ==UserScript==
// @name edx-enumerate
// @source https://gist.github.com/mfellner/194b7d70b9d1a682cf37
// @downloadURL https://gist.github.com/194b7d70b9d1a682cf37.git
// @version 0.1.0
// @description Enumerate answer choices
// @author mfellner
// @include *://courses.edx.org/courses/*courseware*
// @run-at document-idle
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
var $ = window.jQuery;
$(window).load(function() {
$('form.choicegroup').each(function() {
$.each($(this).find('label'), function(i, label) {
$(label).prepend('<span style="font-weight: bold">' + i + '.</span>');
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment