Last active
December 24, 2015 03:39
-
-
Save kvu787/6738422 to your computer and use it in GitHub Desktop.
see comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Visit courses.cs.washington.edu/courses/cse143/13au/homework.shtml or | |
// https://courses.cs.washington.edu/courses/cse143/13au/homework.shtml and run | |
// this snippet of JavaScript to display otherwise hidden homework assignments. | |
// | |
// Note that the revealed assignments are probably old ones. | |
(function () { | |
"use strict"; | |
// display commented content | |
var newHTML = document.getElementsByTagName('html')[0].innerHTML; | |
document.getElementsByTagName('html')[0].innerHTML = newHTML.replace(/(<!--)|(-->)/g, ''); | |
// display elements with 'delayed' class | |
var delayedElements = document.getElementsByClassName('delayed'); | |
for (var i = 0; i < delayedElements.length; i++) { | |
delayedElements[i].setAttribute('style', 'display: block'); | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment