Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rf-
Last active August 29, 2015 14:06
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 rf-/6ebffdb59422c32c042c to your computer and use it in GitHub Desktop.
Save rf-/6ebffdb59422c32c042c to your computer and use it in GitHub Desktop.
User script for revealing Clickhole quiz answers
// ==UserScript==
// @name Expose Clickhole Quizzes
// @namespace http://rynftz.gr
// @include *clickhole.com*
// @grant none
// ==/UserScript==
(function() {
$('#quiz .question .prompt').append(
$('<a href="#" class="expose-answers" style="font-size: 12px; display: block">Show Answers</a>')
);
$('#quiz .question').on('click', '.expose-answers', function(e) {
$(e.delegateTarget).find('.answer-explanation').show();
return false;
});
$('#quiz #check-outcome').after(
$('<a href="#" class="expose-results" style="font-size: 12px; display: block">Show Results</a>')
);
$('#quiz .expose-results').on('click', function(e) {
$('#outcomes, .outcome').show();
return false;
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment